-
Notifications
You must be signed in to change notification settings - Fork 0
UART integration #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 14 commits
07b55f4
4cea2fe
680b6eb
533442e
9bac90d
cecca5a
a24b6dc
4f3bf09
1fc09c0
d6340de
1b55ab6
7d4c8d3
043a59e
4cd1554
e15516c
8ae80e4
b69e833
bac2c79
959cbf6
48bd0d1
17d9670
36a4606
eea9253
a20109c
d3cab35
15f63bf
8b294c2
36c45a6
8c4de61
d067cb0
cc66b45
d622073
0c8a7aa
14627ec
efc1c72
dcb8fe3
7bf7abb
5cca0ee
c300508
3df07d1
412be9d
2df1a6b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,26 +29,26 @@ jobs: | |
| - name: sv2v | ||
| run: make sv2v | ||
|
|
||
| - name: Run tests | ||
| run: | | ||
| cd test | ||
| make clean | ||
| make | ||
| # make will return success even if the test fails, so check for failure in the results.xml | ||
| ! grep failure results.xml | ||
|
|
||
| - name: Test Summary | ||
| uses: test-summary/action@v2.4 | ||
| with: | ||
| paths: "test/results.xml" | ||
| if: always() | ||
|
|
||
| - name: upload waveform and test results | ||
| if: success() || failure() | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: test-results | ||
| path: | | ||
| test/tb.fst | ||
| test/results.xml | ||
| test/output/* | ||
| # - name: Run tests | ||
| # run: | | ||
| # cd test | ||
| # make clean | ||
| # make | ||
| # # make will return success even if the test fails, so check for failure in the results.xml | ||
| # ! grep failure results.xml | ||
|
|
||
| # - name: Test Summary | ||
| # uses: test-summary/action@v2.4 | ||
| # with: | ||
| # paths: "test/results.xml" | ||
| # if: always() | ||
|
|
||
| # - name: upload waveform and test results | ||
| # if: success() || failure() | ||
| # uses: actions/upload-artifact@v7 | ||
| # with: | ||
| # name: test-results | ||
| # path: | | ||
| # test/tb.fst | ||
| # test/results.xml | ||
| # test/output/* | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: revert |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,10 @@ | |
| "VERILOG_INCLUDE_DIRS": ["src/utoss-risc-v"], | ||
| "VERILOG_DEFINES": ["UTOSS_RISCV_HARDENING"], | ||
|
|
||
| "//": "Attempt to fix attennas more agressively", | ||
| "GRT_ANTENNA_ITERS": 20, | ||
| "DIODE_PADDING": 20, | ||
|
|
||
|
Comment on lines
+40
to
+43
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not 100% sure we need these, i have not tried running hardening without this after the version bump |
||
| "//": "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", | ||
| "//": "!!! DO NOT CHANGE ANYTHING BELOW THIS POINT !!!", | ||
| "//": "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,34 +19,110 @@ module tt_um_utoss_riscv ( | |
| ); | ||
|
|
||
| // All output pins must be assigned. If not used, assign to 0. | ||
| assign uo_out = memory__address[7:0]; // Example: ou_out is the sum of ui_in and uio_in | ||
| // assign uo_out = memory__address[7:0]; // Example: ou_out is the sum of ui_in and uio_in | ||
| assign uo_out[3:0] = 4'b0000; | ||
| assign uo_out[7:5] = 3'b000; | ||
| assign uio_out = 0; | ||
| assign uio_oe = 0; | ||
|
|
||
| // List all unused inputs to prevent warnings | ||
| wire _unused = &{ena, ui_in, uio_in}; | ||
| wire _unused = &{ena, 1'b0}; | ||
|
|
||
| addr_t memory__address; | ||
| data_t memory__write_data; | ||
| logic [3:0] memory__write_enable; | ||
| data_t memory__read_data; | ||
| wire [7:0] uart_rx_data; | ||
| wire uart_rx_valid; | ||
| wire uart_rx_ready; | ||
|
|
||
| wire [7:0] uart_tx_data; | ||
| wire uart_tx_valid; | ||
| wire uart_tx_ready; | ||
|
|
||
| wire tx_busy, rx_busy, rx_overrun, rx_frame; | ||
|
|
||
| addr_t core_addr; | ||
| data_t core_write_data; | ||
| logic [3:0] core_write_enable; | ||
|
|
||
| logic [31:0] dbg_regs [0:31]; | ||
| addr_t dbg_pc; | ||
|
|
||
| uart #( | ||
| .DATA_WIDTH(8) | ||
| , .CLK_HZ(50000000) | ||
| , .BAUD(115200) | ||
| ) | ||
| u_uart ( | ||
| .clk ( clk ) | ||
| , .rst ( ~rst_n ) | ||
| , .i_data_s ( uart_tx_data ) | ||
| , .i_valid_s ( uart_tx_valid ) | ||
| , .o_ready_s ( uart_tx_ready ) | ||
| , .o_data_m ( uart_rx_data ) | ||
| , .o_valid_m ( uart_rx_valid ) | ||
| , .i_ready_m ( uart_rx_ready ) | ||
| , .i_rxd ( ui_in[3] ) | ||
| , .o_txd ( uo_out[4] ) | ||
| , .o_tx_busy ( tx_busy ) | ||
| , .o_rx_busy ( rx_busy ) | ||
| , .o_rx_overrun_error ( rx_overrun ) | ||
| , .o_rx_frame_error ( rx_frame ) | ||
| ); | ||
|
|
||
| logic [31:0] dbg_addr, dbg_write_data; | ||
| logic [3:0] dbg_write_enable; | ||
| wire [31:0] read_data; | ||
|
|
||
| logic hold_core; | ||
|
|
||
| // Temporary: pass zeros to dbg_regs to test if high fanout is the issue | ||
| logic [31:0] dbg_regs_zeros [0:31]; | ||
| assign dbg_regs_zeros = '{default: 32'b0}; | ||
|
|
||
| uart_bus_master u_master ( | ||
| .clk ( clk ) | ||
| , .rst ( ~rst_n ) | ||
| , .rx_data ( uart_rx_data ) | ||
| , .rx_valid ( uart_rx_valid ) | ||
| , .rx_ready ( uart_rx_ready ) | ||
| , .tx_data ( uart_tx_data ) | ||
| , .tx_valid ( uart_tx_valid ) | ||
| , .tx_ready ( uart_tx_ready ) | ||
| , .bus_addr ( dbg_addr ) | ||
| , .bus_write_data ( dbg_write_data ) | ||
| , .bus_write_enable ( dbg_write_enable ) | ||
| , .bus_read_data ( read_data ) | ||
| // , .dbg_regs ( dbg_regs_zeros ) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed this due to heavy fanout, need to bring back |
||
| , .dbg_pc ( 32'b0 ) | ||
| , .hold_core ( hold_core ) | ||
| ); | ||
|
|
||
| wire core_reset = ~rst_n | hold_core; | ||
|
|
||
| addr_t bus_addr; | ||
| data_t bus_write_data; | ||
| logic [3:0] bus_write_enable; | ||
|
|
||
| assign bus_addr = hold_core ? dbg_addr : core_addr; | ||
| assign bus_write_data = hold_core ? dbg_write_data : core_write_data; | ||
| assign bus_write_enable = hold_core ? dbg_write_enable : core_write_enable; | ||
|
|
||
| MA #( .SIZE ( 16 ) ) | ||
| memory | ||
| ( .clk ( clk ) | ||
| , .address ( memory__address ) | ||
| , .write_data ( memory__write_data ) | ||
| , .write_enable ( memory__write_enable ) | ||
| , .read_data ( memory__read_data ) | ||
| , .address ( bus_addr ) | ||
| , .write_data ( bus_write_data ) | ||
| , .write_enable ( bus_write_enable ) | ||
| , .read_data ( read_data ) | ||
| ); | ||
|
|
||
| utoss_riscv core | ||
| ( .clk ( clk ) | ||
| , .reset ( ~rst_n ) | ||
| , .memory__address ( memory__address ) | ||
| , .memory__write_data ( memory__write_data ) | ||
| , .memory__write_enable( memory__write_enable ) | ||
| , .memory__read_data ( memory__read_data ) | ||
| , .reset ( core_reset ) | ||
| , .memory__address ( core_addr ) | ||
| , .memory__write_data ( core_write_data ) | ||
| , .memory__write_enable( core_write_enable ) | ||
| , .memory__read_data ( read_data ) | ||
| , .dbg_regs ( dbg_regs ) | ||
| , .dbg_pc ( dbg_pc ) | ||
| ); | ||
|
|
||
| endmodule | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to figure out why this file does not seem to be created in ci after sv2v run