Skip to content

Commit

Permalink
Updating mio to new packet format
Browse files Browse the repository at this point in the history
  • Loading branch information
aolofsson committed May 15, 2016
1 parent 363a5cf commit e607155
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/mio/hdl/mio.v
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ module mio (/*AUTOARG*/
parameter NMIO = 8; // IO width
parameter AW = 32; // address width
parameter MPW = 128; // mio packet width (>PW)

localparam PW = 2*AW+40; // emesh packet width
parameter PW = 2*AW+40; // emesh packet width
parameter DEF_CFG = 0; // Default config
parameter DEF_CLK = 0; // Default clock
parameter TARGET = "GENERIC";// GENERIC,XILINX,ALTERA,GENERIC,ASIC
Expand Down Expand Up @@ -102,6 +101,7 @@ module mio (/*AUTOARG*/
*/

mio_regs #(.AW(AW),
.PW(PW),
.DEF_CFG(DEF_CFG),
.DEF_CLK(DEF_CLK))
mio_regs (.dmode (),
Expand Down Expand Up @@ -220,6 +220,7 @@ module mio (/*AUTOARG*/
);
*/
mio_if #(.AW(AW),
.PW(PW),
.MPW(MPW))
mio_if (
/*AUTOINST*/
Expand Down
8 changes: 5 additions & 3 deletions src/mio/hdl/mio_if.v
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module mio_if (/*AUTOARG*/

//parameters
parameter AW = 32; // address width
parameter PW = 2*AW +40; // emesh packet width
parameter PW = 104; // emesh packet width
parameter MPW = 128; // mio packet width (> PW)

// reset, clk, config
Expand Down Expand Up @@ -87,7 +87,8 @@ module mio_if (/*AUTOARG*/
//#################################################

// parse packet
packet2emesh #(.AW(AW))
packet2emesh #(.AW(AW),
.PW(PW))
pe2 (.packet_in (rx_packet_in[PW-1:0]),
/*AUTOINST*/
// Outputs
Expand Down Expand Up @@ -133,7 +134,8 @@ module mio_if (/*AUTOARG*/
srcaddr_in[AW-1:0];

//Construct outgoing packet
emesh2packet #(.AW(AW))
emesh2packet #(.AW(AW),
.PW(PW))
e2p (/*AUTOINST*/
// Outputs
.packet_out (packet_out[PW-1:0]),
Expand Down
5 changes: 3 additions & 2 deletions src/mio/hdl/mio_regs.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module mio_regs (/*AUTOARG*/
// parameters
parameter N = 8; // number of I/O pins
parameter AW = 32; // address width
localparam PW = 2*AW+40; // packet width
parameter PW = 2*AW+40; // packet width
parameter DEF_CFG = 0; // reset MIO_CONFI value
parameter DEF_CLK = 0; // reset MIO_CLKDIV value
localparam DEF_RISE0 = 0; // 0 degrees
Expand Down Expand Up @@ -88,7 +88,8 @@ module mio_regs (/*AUTOARG*/
//# DECODE
//#####################################

packet2emesh #(.AW(AW))
packet2emesh #(.AW(AW),
.PW(PW))
p2e (/*AUTOINST*/
// Outputs
.write_in (write_in),
Expand Down

0 comments on commit e607155

Please sign in to comment.