Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
NanoSoC Tech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SoCLabs
NanoSoC Tech
Compare revisions
739d88794a0b7c45cd4ae62277edf915bfc44ef4 to 88cf4e7de56e5a13555dd315309d1432d102e19a
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
soclabs/nanosoc_tech
Select target project
No results found
88cf4e7de56e5a13555dd315309d1432d102e19a
Select Git revision
Swap
Target
soclabs/nanosoc_tech
Select target project
soclabs/nanosoc_tech
1 result
739d88794a0b7c45cd4ae62277edf915bfc44ef4
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
update QS testbench for 38K4 uart tests
· 88cf4e7d
dwf1m12
authored
1 year ago
88cf4e7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
verif/tb/verilog/nanosoc_tb_qs.v
+20
-7
20 additions, 7 deletions
verif/tb/verilog/nanosoc_tb_qs.v
with
20 additions
and
7 deletions
verif/tb/verilog/nanosoc_tb_qs.v
View file @
88cf4e7d
...
...
@@ -184,24 +184,36 @@ SROM_Ax32
// --------------------------------------------------------------------------------
// external UART phase lock to (known) baud rate
// --------------------------------------------------------------------------------
// UART output capture
// --------------------------------------------------------------------------------
`ifdef
ARM_CMSDK_SLOWSPEED_PCLK
// If PCLK is running at slower speed, the UART output will also be slower
assign
PCLK
=
u_cmsdk_mcu
.
u_cmsdk_mcu
.
PCLK
;
`else
assign
PCLK
=
CLK
;
`endif
// --------------------------------------------------------------------------------
// external UART phase lock to (known) baud rate
// seem unable to use the following (due to generate instance naming?)
// wire baudx16_clk = u_cmsdk_mcu.u_cmsdk_mcu.u_cmsdk_mcu_system.u_apb_subsystem.u_apb_uart_2.BAUDTICK;
// 2000000/
208 = 9615 baud (+0.16%)
//
208 / 16
`define
BAUDPROG
130
// 2
40
000000/
6250 = 38400 baud
//
6250/16 = 390.625
`define
BAUDPROG
DIV16 389
reg
[
7
:
0
]
bauddiv
;
wire
baudclken
=
(
bauddiv
==
8
'b0
0000000
);
reg
[
8
:
0
]
bauddiv
;
wire
baudclken
=
(
bauddiv
==
9
'b0
);
always
@
(
negedge
NRST
or
posedge
PCLK
)
if
(
!
NRST
)
bauddiv
<=
0
;
else
bauddiv
<=
(
baudclken
)
?
(
`BAUDPROG
-
1
)
:
(
bauddiv
-
1
)
;
// count down of BAUDPROG
bauddiv
<=
(
baudclken
)
?
(
`BAUDPROG
DIV16
-
1
)
:
(
bauddiv
-
1
)
;
// count down of BAUDPROG
wire
baudx16_clk
=
bauddiv
[
7
];
//prefer:// !baudclken;
wire
baudx16_clk
=
bauddiv
[
8
];
//prefer:// !baudclken;
wire
UARTXD
=
P1
[
5
];
reg
UARTXD_del
;
...
...
@@ -232,6 +244,7 @@ reg baud_clk_del;
else
baud_clk_del
<=
baud_clk
;
// --------------------------------------------------------------------------------
// set FASTMODE true if UART simulation mode is programmed
wire
FASTMODE
=
1'b0
;
...
...
This diff is collapsed.
Click to expand it.