Skip to content

Commit

Permalink
testbench minor adaptions
Browse files Browse the repository at this point in the history
  • Loading branch information
fhaus1 committed Dec 5, 2024
1 parent 00b007e commit 8874978
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ sources:
- target/sim/src/tb_cheshire_pkg.sv
- target/sim/src/fixture_cheshire_soc.sv
- target/sim/src/tb_cheshire_soc.sv
- hw/newusb_tb/new_usb_tb.sv
- hw/newusb_tb/tb_new_usb.sv

- target: all(fpga, xilinx)
files:
Expand Down
16 changes: 11 additions & 5 deletions hw/newusb/new_usb_ohci.sv
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ module new_usb_ohci import new_usb_ohci_pkg::*; #(
`include "axi/typedef.svh"
`include "common_cells/registers.svh"

logic clk_i;
logic rst_ni;
assign clk_i = soc_clk_i;
assign rst_ni = soc_rst_ni;


newusb_reg_pkg::newusb_hw2reg_t newusb_hw2reg;
newusb_reg_pkg::newusb_reg2hw_t newusb_reg2hw;

Check warning on line 64 in hw/newusb/new_usb_ohci.sv

View workflow job for this annotation

GitHub Actions / verible-verilog-lint

[verible-verilog-lint] hw/newusb/new_usb_ohci.sv#L64

Remove trailing spaces. [Style: trailing-spaces] [no-trailing-spaces]
Raw output
message:"Remove trailing spaces. [Style: trailing-spaces] [no-trailing-spaces]" location:{path:"hw/newusb/new_usb_ohci.sv" range:{start:{line:64 column:1}}} severity:WARNING source:{name:"verible-verilog-lint" url:"https://github.com/chipsalliance/verible"} suggestions:{range:{start:{line:64 column:1} end:{line:65}} text:"\n"}
Expand Down Expand Up @@ -89,8 +95,8 @@ module new_usb_ohci import new_usb_ohci_pkg::*; #(
endpoint_descriptor processed;
logic processed_ed_store;
store_type processed_store_type;
logic [27:0] newcurrentED_o,
logic newcurrentED_valid_o,
logic [27:0] newcurrentED_o;
logic newcurrentED_valid_o;
logic id_valid;
logic [2:0] id_type;
logic sent_head;
Expand Down Expand Up @@ -151,7 +157,7 @@ module new_usb_ohci import new_usb_ohci_pkg::*; #(
.counter_is_threshold_o(counter_is_threshold),
.cbsr_i(reg2hw.hccontrol.cbsr.q),
/// nextis
.nextis_valid_o(nextis_valid) // needs to be one clock cycle
.nextis_valid_o(nextis_valid), // needs to be one clock cycle
.nextis_ed_o(nextis_ed), // 0 if empty ed rerequest or td
.nextis_type_o(nextis_type),
.nextis_address_o(nextis_address),
Expand All @@ -171,8 +177,8 @@ module new_usb_ohci import new_usb_ohci_pkg::*; #(
.dma_valid_i(),
.dma_ready_o(),
/// periodic
.context_switch_np2p_i,
.context_switch_p2np_i,
.context_switch_np2p_i(context_switch_np2p),
.context_switch_p2np_i(context_switch_p2np),
/// head state
.sent_head_i(sent_head)
);
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions hw/newusb_tb/new_usb_tb.sv → hw/newusb_tb/tb_new_usb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

`timescale 1ps/1ps

module new_usb_tb #(
module tb_new_usb #(
/// DMA manager port parameters
parameter int unsigned AxiMaxReads = 0,
parameter int unsigned AxiAddrWidth = 32,
Expand Down Expand Up @@ -44,7 +44,7 @@ string line;

initial begin

Check warning on line 46 in hw/newusb_tb/tb_new_usb.sv

View workflow job for this annotation

GitHub Actions / verible-verilog-lint

[verible-verilog-lint] hw/newusb_tb/tb_new_usb.sv#L46

Remove trailing spaces. [Style: trailing-spaces] [no-trailing-spaces]
Raw output
message:"Remove trailing spaces. [Style: trailing-spaces] [no-trailing-spaces]" location:{path:"hw/newusb_tb/tb_new_usb.sv" range:{start:{line:46 column:1}}} severity:WARNING source:{name:"verible-verilog-lint" url:"https://github.com/chipsalliance/verible"} suggestions:{range:{start:{line:46 column:1} end:{line:47}} text:"\n"}
file = $fopen("../../../hw/newusb_tb/new_usb_tb.mem", "r");
file = $fopen("../../../hw/newusb_tb/tb_new_usb.mem", "r");
if (file == 0) begin
$display("Failed to open file.");
$finish;
Expand Down
2 changes: 1 addition & 1 deletion target/sim/vsim/recompile.newusb.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
#
# Recompile only newusb (way faster)

vlog -work work -sv ../../../hw/newusb_tb/new_usb_tb.sv
vlog -work work -sv ../../../hw/newusb_tb/tb_new_usb.sv
2 changes: 1 addition & 1 deletion target/sim/vsim/start.newusb.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Fabian Hauser <[email protected]>

set TESTBENCH new_usb_tb
set TESTBENCH tb_new_usb

eval "vsim -c ${TESTBENCH} -t 1ps"

Expand Down

0 comments on commit 8874978

Please sign in to comment.