mirror of
https://github.com/aolofsson/oh.git
synced 2025-01-17 20:02:53 +08:00
Adding missing parameters statements in mio_if
This commit is contained in:
parent
ac5a77ec6c
commit
4b87fdae34
@ -12,10 +12,10 @@ module mio (/*AUTOARG*/
|
||||
//#####################################################################
|
||||
|
||||
//parameters
|
||||
parameter N = 8; // Mini IO width
|
||||
parameter AW = 32; // address width
|
||||
localparam PW = 2*AW+40; // emesh packet width
|
||||
parameter MPW = 128; // mio packet width (>PW)
|
||||
parameter N = 8; // Mini IO width
|
||||
parameter DEF_CFG = 0; // Default config
|
||||
parameter DEF_CLK = 0; // Default clock
|
||||
parameter TARGET = "GENERIC"; // GENERIC,XILINX,ALTERA,GENERIC,ASIC
|
||||
@ -24,13 +24,13 @@ module mio (/*AUTOARG*/
|
||||
input clk; // main core clock
|
||||
input nreset; // async active low reset
|
||||
|
||||
// tx chip interface
|
||||
// tx chip interface (to IO)
|
||||
output tx_clk; // phase shited io_clk
|
||||
output tx_access; // access signal for IO
|
||||
output [N-1:0] tx_packet; // packet for IO
|
||||
input tx_wait; // pushback from IO
|
||||
|
||||
// rx chip interface
|
||||
// rx chip interface (from IO)
|
||||
input rx_clk; // rx clock
|
||||
input rx_access; // rx access
|
||||
input [N-1:0] rx_packet; // rx packet
|
||||
|
@ -16,7 +16,6 @@ module mio_if (/*AUTOARG*/
|
||||
//parameters
|
||||
parameter AW = 32; // address width
|
||||
parameter PW = 2*AW +40; // emesh packet width
|
||||
parameter N = 8; // number of extra bits in
|
||||
parameter MPW = PW+8; // mio packet width
|
||||
|
||||
// reset, clk, config
|
||||
@ -88,15 +87,16 @@ module mio_if (/*AUTOARG*/
|
||||
//#################################################
|
||||
|
||||
// parse packet
|
||||
packet2emesh pe2 (.packet_in (rx_packet_in[PW-1:0]),
|
||||
/*AUTOINST*/
|
||||
// Outputs
|
||||
.write_in (write_in),
|
||||
.datamode_in (datamode_in[1:0]),
|
||||
.ctrlmode_in (ctrlmode_in[4:0]),
|
||||
.dstaddr_in (dstaddr_in[AW-1:0]),
|
||||
.srcaddr_in (srcaddr_in[AW-1:0]),
|
||||
.data_in (data_in[AW-1:0]));
|
||||
packet2emesh #(.AW(AW))
|
||||
pe2 (.packet_in (rx_packet_in[PW-1:0]),
|
||||
/*AUTOINST*/
|
||||
// Outputs
|
||||
.write_in (write_in),
|
||||
.datamode_in (datamode_in[1:0]),
|
||||
.ctrlmode_in (ctrlmode_in[4:0]),
|
||||
.dstaddr_in (dstaddr_in[AW-1:0]),
|
||||
.srcaddr_in (srcaddr_in[AW-1:0]),
|
||||
.data_in (data_in[AW-1:0]));
|
||||
|
||||
// datamode
|
||||
assign datamode[1:0] = (datasize[3:0]==4'd1) ? 2'b00 :
|
||||
@ -133,16 +133,17 @@ module mio_if (/*AUTOARG*/
|
||||
srcaddr_in[AW-1:0];
|
||||
|
||||
//Construct outgoing packet
|
||||
emesh2packet e2p (/*AUTOINST*/
|
||||
// Outputs
|
||||
.packet_out (packet_out[PW-1:0]),
|
||||
// Inputs
|
||||
.write_out (write_out),
|
||||
.datamode_out (datamode_out[1:0]),
|
||||
.ctrlmode_out (ctrlmode_out[4:0]),
|
||||
.dstaddr_out (dstaddr_out[AW-1:0]),
|
||||
.data_out (data_out[AW-1:0]),
|
||||
.srcaddr_out (srcaddr_out[AW-1:0]));
|
||||
emesh2packet #(.AW(AW))
|
||||
e2p (/*AUTOINST*/
|
||||
// Outputs
|
||||
.packet_out (packet_out[PW-1:0]),
|
||||
// Inputs
|
||||
.write_out (write_out),
|
||||
.datamode_out (datamode_out[1:0]),
|
||||
.ctrlmode_out (ctrlmode_out[4:0]),
|
||||
.dstaddr_out (dstaddr_out[AW-1:0]),
|
||||
.data_out (data_out[AW-1:0]),
|
||||
.srcaddr_out (srcaddr_out[AW-1:0]));
|
||||
|
||||
endmodule // mio_if
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user