1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-17 20:02:53 +08:00

Lint fixes for icarus/verilator

This commit is contained in:
Andreas Olofsson 2015-11-09 21:57:25 -05:00
parent 243ba6b608
commit 04cd179f5a
18 changed files with 49 additions and 34 deletions

View File

@ -1,13 +1,7 @@
#Always search local
-y . -y .
#DV
-y ../../common/dv -y ../../common/dv
-y ../../emesh/dv -y ../../emesh/dv
-y ../../memory/dv -y ../../memory/dv
#HDL
-y .
-y ../../common/hdl -y ../../common/hdl
-y ../../elink/hdl -y ../../elink/hdl
-y ../../edma/hdl -y ../../edma/hdl
@ -17,11 +11,7 @@
-y ../../memory/hdl -y ../../memory/hdl
-y ../../xilibs/hdl -y ../../xilibs/hdl
-y ../../parallella/hdl -y ../../parallella/hdl
#FPGA
-y ../../memory/fpga -y ../../memory/fpga
#INCLUDE PATHS (FOR CONSTANTS)
+incdir+../../emesh/hdl +incdir+../../emesh/hdl
+incdir+../../elink/hdl +incdir+../../elink/hdl
+incdir+../../edma/hdl +incdir+../../edma/hdl

View File

@ -8,7 +8,7 @@
# #
dut="elink" dut="elink"
top="../../common/dv/dv_top.v" top="../../common/dv/dv_top.v"
iverilog -g2005 -DTARGET_SIM=1 -DTARGET_XILINX=1 $top dut_${dut}.v -f ../../common/dv/libs.cmd -o ${dut}.vvp iverilog -g2005 -DTARGET_SIM=1 -DTARGET_XILINX=1 $top dut_${dut}.v -f ../../common/dv/libs.cmd -o ${dut}.vvp
#PUT TARGET_SIM #PUT TARGET_SIM

View File

@ -248,11 +248,11 @@ module dut(/*AUTOARG*/
); );
*/ */
//No read/write from elink1 (for now) //No read/write from elink1 (for now)
assign elink1_txrd_access = 1'b0; wire elink1_txrd_access = 1'b0;
assign elink1_txrd_packet = 'b0; wire elink1_txrd_packet = 'b0;
assign elink1_txwr_access = 1'b0; wire elink1_txwr_access = 1'b0;
assign elink1_txwr_packet = 'b0; wire elink1_txwr_packet = 'b0;
assign elink1_rxrr_wait = 1'b0; wire elink1_rxrr_wait = 1'b0;
defparam elink1.ID = 12'h820; defparam elink1.ID = 12'h820;
defparam elink1.ETYPE = 0; defparam elink1.ETYPE = 0;
@ -310,6 +310,8 @@ module dut(/*AUTOARG*/
.rxrd_wait (elink1_rxrd_wait)); // Templated .rxrd_wait (elink1_rxrd_wait)); // Templated
wire emem_wait;
//"Arbitration" between read/write transaction //"Arbitration" between read/write transaction
assign emem_access = elink1_rxwr_access | elink1_rxrd_access; assign emem_access = elink1_rxwr_access | elink1_rxrd_access;

View File

@ -157,7 +157,7 @@ module elink (/*AUTOARG*/
defparam erx.ETYPE = ETYPE; defparam erx.ETYPE = ETYPE;
erx erx(.rx_active (elink_active), erx erx(.rx_active (elink_active),
.erx_nreset (erx_nreset), .erx_nreset (),
/*AUTOINST*/ /*AUTOINST*/
// Outputs // Outputs
.rxo_wr_wait_p (rxo_wr_wait_p), .rxo_wr_wait_p (rxo_wr_wait_p),

View File

@ -61,7 +61,8 @@ module elink_cfg (/*AUTOARG*/
wire mi_en; wire mi_en;
wire [31:0] mi_addr; wire [31:0] mi_addr;
wire [31:0] mi_din; wire [31:0] mi_din;
wire mi_we;
packet2emesh pe2 ( packet2emesh pe2 (
// Outputs // Outputs
.write_out (mi_we), .write_out (mi_we),

View File

@ -72,6 +72,7 @@ module erx_clocks (/*AUTOARG*/
reg [2:0] reset_state; reg [2:0] reset_state;
wire pll_reset; wire pll_reset;
reg rx_nreset; reg rx_nreset;
wire pll_locked;
//Reset //Reset
assign rx_nreset_in = sys_nreset & tx_active; assign rx_nreset_in = sys_nreset & tx_active;

View File

@ -245,6 +245,7 @@ module erx_core (/*AUTOARG*/
.packet_out (ecfg_packet[PW-1:0]), // Templated .packet_out (ecfg_packet[PW-1:0]), // Templated
// Inputs // Inputs
.clk (clk), .clk (clk),
.nreset (nreset),
.access_in (erx_cfg_access), // Templated .access_in (erx_cfg_access), // Templated
.packet_in (erx_cfg_packet[PW-1:0]), // Templated .packet_in (erx_cfg_packet[PW-1:0]), // Templated
.mi_dout0 ({32'b0,mi_cfg_dout[31:0]}), // Templated .mi_dout0 ({32'b0,mi_cfg_dout[31:0]}), // Templated

View File

@ -63,6 +63,8 @@ module etx(/*AUTOARG*/
wire tx_lclk90; // From etx_clocks of etx_clocks.v wire tx_lclk90; // From etx_clocks of etx_clocks.v
wire tx_lclk_io; // From etx_clocks of etx_clocks.v wire tx_lclk_io; // From etx_clocks of etx_clocks.v
// End of automatics // End of automatics
// Beginning of automatic wires (for undeclared instantiated-module outputs) // Beginning of automatic wires (for undeclared instantiated-module outputs)
wire tx_access; // From etx_core of etx_core.v wire tx_access; // From etx_core of etx_core.v
wire tx_burst; // From etx_core of etx_core.v wire tx_burst; // From etx_core of etx_core.v
@ -78,12 +80,11 @@ module etx(/*AUTOARG*/
wire txwr_fifo_access; // From etx_fifo of etx_fifo.v wire txwr_fifo_access; // From etx_fifo of etx_fifo.v
wire [PW-1:0] txwr_fifo_packet; // From etx_fifo of etx_fifo.v wire [PW-1:0] txwr_fifo_packet; // From etx_fifo of etx_fifo.v
wire txwr_fifo_wait; // From etx_core of etx_core.v wire txwr_fifo_wait; // From etx_core of etx_core.v
wire etx_io_nreset;
/************************************************************/ /************************************************************/
/*Clocks */ /*Clocks */
/************************************************************/ /************************************************************/
etx_clocks etx_clocks (.etx_io_nreset (etx_io_nreset), etx_clocks etx_clocks (/*AUTOINST*/
/*AUTOINST*/
// Outputs // Outputs
.tx_lclk_io (tx_lclk_io), .tx_lclk_io (tx_lclk_io),
.tx_lclk90 (tx_lclk90), .tx_lclk90 (tx_lclk90),
@ -91,6 +92,7 @@ module etx(/*AUTOARG*/
.cclk_p (cclk_p), .cclk_p (cclk_p),
.cclk_n (cclk_n), .cclk_n (cclk_n),
.etx_nreset (etx_nreset), .etx_nreset (etx_nreset),
.etx_io_nreset (etx_io_nreset),
.chip_nreset (chip_nreset), .chip_nreset (chip_nreset),
.tx_active (tx_active), .tx_active (tx_active),
// Inputs // Inputs
@ -175,10 +177,14 @@ module etx(/*AUTOARG*/
/***********************************************************/ /***********************************************************/
/*TRANSMIT I/O LOGIC */ /*TRANSMIT I/O LOGIC */
/***********************************************************/ /***********************************************************/
/*etx_io AUTO_TEMPLATE (
.nreset (etx_io_nreset),
);
*/
etx_io #(.ETYPE(ETYPE)) etx_io #(.ETYPE(ETYPE))
etx_io (.nreset (etx_io_nreset), etx_io (
/*AUTOINST*/ /*AUTOINST*/
// Outputs // Outputs
.txo_lclk_p (txo_lclk_p), .txo_lclk_p (txo_lclk_p),
.txo_lclk_n (txo_lclk_n), .txo_lclk_n (txo_lclk_n),
@ -190,6 +196,7 @@ module etx(/*AUTOARG*/
.tx_wr_wait (tx_wr_wait), .tx_wr_wait (tx_wr_wait),
.tx_rd_wait (tx_rd_wait), .tx_rd_wait (tx_rd_wait),
// Inputs // Inputs
.nreset (etx_io_nreset), // Templated
.tx_lclk_io (tx_lclk_io), .tx_lclk_io (tx_lclk_io),
.tx_lclk90 (tx_lclk90), .tx_lclk90 (tx_lclk90),
.txi_wr_wait_p (txi_wr_wait_p), .txi_wr_wait_p (txi_wr_wait_p),

View File

@ -67,7 +67,8 @@ module etx_cfg (/*AUTOARG*/
wire ecfg_tx_test_write; wire ecfg_tx_test_write;
wire ecfg_tx_addr_write; wire ecfg_tx_addr_write;
wire ecfg_tx_data_write; wire ecfg_tx_data_write;
wire loop_mode; wire ecfg_version_write;
wire ecfg_tx_status_write;
/*****************************/ /*****************************/
/*ADDRESS DECODE LOGIC */ /*ADDRESS DECODE LOGIC */

View File

@ -73,6 +73,10 @@ module etx_clocks (/*AUTOARG*/
reg mmcm_locked_sync; reg mmcm_locked_sync;
wire lclk_locked; wire lclk_locked;
wire tx_nreset; wire tx_nreset;
wire mmcm_reset;
wire tx_lclk;
wire tx_lclk_div4_mmcm;
//########################### //###########################
// RESET STATE MACHINE // RESET STATE MACHINE
@ -155,7 +159,7 @@ module etx_clocks (/*AUTOARG*/
rsync rsync_io (// Outputs rsync rsync_io (// Outputs
.nrst_out (etx_io_nreset), .nrst_out (etx_io_nreset),
// Inputs // Inputs
.clk (tx_lclk), .clk (tx_lclk_io),
.nrst_in (tx_nreset)); .nrst_in (tx_nreset));
rsync rsync_core (// Outputs rsync rsync_core (// Outputs
@ -215,7 +219,8 @@ module etx_clocks (/*AUTOARG*/
.PWRDWN(1'b0), .PWRDWN(1'b0),
.RST(mmcm_reset), //reset .RST(mmcm_reset), //reset
.CLKFBIN(cclk_fb), .CLKFBIN(cclk_fb),
.CLKFBOUT(cclk_fb), //feedback clock .CLKFBOUT(cclk_fb), //feedback clock
.CLKFBOUTB(), //inverted output feedback clock
.CLKIN1(sys_clk), //input clock .CLKIN1(sys_clk), //input clock
.CLKIN2(1'b0), .CLKIN2(1'b0),
.CLKINSEL(1'b1), .CLKINSEL(1'b1),

View File

@ -136,6 +136,7 @@ module etx_core(/*AUTOARG*/
.packet_out (etx_cfg_packet[PW-1:0]), // Templated .packet_out (etx_cfg_packet[PW-1:0]), // Templated
// Inputs // Inputs
.clk (clk), .clk (clk),
.nreset (nreset),
.access_in (etx_access), // Templated .access_in (etx_access), // Templated
.packet_in (etx_packet[PW-1:0]), // Templated .packet_in (etx_packet[PW-1:0]), // Templated
.mi_dout0 ({32'b0,mi_cfg_dout[31:0]}), // Templated .mi_dout0 ({32'b0,mi_cfg_dout[31:0]}), // Templated

View File

@ -64,6 +64,8 @@ module etx_io (/*AUTOARG*/
wire txo_frame; wire txo_frame;
wire txo_lclk90; wire txo_lclk90;
reg tx_io_ack; reg tx_io_ack;
wire tx_new_frame;
wire tx_lclk90_ddr;
//############################# //#############################
//# Transmit state machine //# Transmit state machine

View File

@ -130,7 +130,7 @@ module etx_protocol (/*AUTOARG*/
.srcaddr_out (), .srcaddr_out (),
.packet_in (tx_packet[PW-1:0]));//input .packet_in (tx_packet[PW-1:0]));//input
assign burst_addr[31:0] = (last_dstaddr[31:0] + 4'd8); assign burst_addr[31:0] = (last_dstaddr[31:0] + 32'h8);
assign burst_addr_match = (burst_addr[31:0] == etx_dstaddr[31:0]); assign burst_addr_match = (burst_addr[31:0] == etx_dstaddr[31:0]);

View File

@ -79,7 +79,7 @@ module emailbox (/*AUTOARG*/
wire mailbox_pop; wire mailbox_pop;
wire [31:0] emesh_addr; wire [31:0] emesh_addr;
wire [63:0] emesh_din; wire [63:0] emesh_din;
wire emesh__write; wire emesh_write;
/*****************************/ /*****************************/
/*WRITE TO FIFO */ /*WRITE TO FIFO */

View File

@ -1,3 +1,4 @@
/* verilator lint_off STMTDLY */
module emesh_monitor(/*AUTOARG*/ module emesh_monitor(/*AUTOARG*/
// Inputs // Inputs
clk, nreset, dut_access, dut_packet, wait_in, coreid clk, nreset, dut_access, dut_packet, wait_in, coreid
@ -28,11 +29,9 @@ module emesh_monitor(/*AUTOARG*/
//TODO: Figure out these delays //TODO: Figure out these delays
#10 #10
//index should be core ID //index should be core ID
$sformat(tracefile,"%0s_%0h%s",NAME,coreid,".trace"); $sformat(tracefile,"%0s_%0h%s",NAME,coreid,".trace");
ftrace = $fopen({tracefile}, "w"); ftrace = $fopen({tracefile}, "w");
end end
always @ (posedge clk or negedge nreset) always @ (posedge clk or negedge nreset)
if(nreset & dut_access & ~wait_in) if(nreset & dut_access & ~wait_in)

View File

@ -1,4 +1,5 @@
`timescale 1ns/10ps `timescale 1ns/10ps
/* verilator lint_off WIDTH */
module IDELAYE2 (/*AUTOARG*/ module IDELAYE2 (/*AUTOARG*/
// Outputs // Outputs
CNTVALUEOUT, DATAOUT, CNTVALUEOUT, DATAOUT,

View File

@ -1,3 +1,5 @@
/* verilator lint_off STMTDLY */
/* verilator lint_off WIDTH */
`timescale 1ns/10ps `timescale 1ns/10ps
module MMCME2_ADV # ( module MMCME2_ADV # (
parameter BANDWIDTH = "OPTIMIZED", parameter BANDWIDTH = "OPTIMIZED",

View File

@ -1,5 +1,6 @@
`timescale 1ns/10ps `timescale 1ns/10ps
/* verilator lint_off STMTDLY */
/* verilator lint_off WIDTH */
module PLLE2_ADV #( module PLLE2_ADV #(
parameter BANDWIDTH = "OPTIMIZED", parameter BANDWIDTH = "OPTIMIZED",
@ -143,6 +144,7 @@ module PLLE2_ADV #(
endgenerate endgenerate
reg [5:0] CLKOUT_DIV_LOCK; reg [5:0] CLKOUT_DIV_LOCK;
always @ (posedge (CLKIN1 & vco_clk) or negedge (CLKIN1&~vco_clk)) always @ (posedge (CLKIN1 & vco_clk) or negedge (CLKIN1&~vco_clk))
begin begin
CLKOUT_DIV_LOCK[5:0] <= CLKOUT_DIV[5:0]; CLKOUT_DIV_LOCK[5:0] <= CLKOUT_DIV[5:0];