Skip to content

Commit

Permalink
Updating gpio for new emesh packet format
Browse files Browse the repository at this point in the history
  • Loading branch information
aolofsson committed May 15, 2016
1 parent 82b6b2f commit 363a5cf
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/gpio/hdl/gpio.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//#############################################################################

`include "gpio_regmap.vh"
module gpio #(
parameter integer N = 24, // number of gpio pins
parameter integer AW = 32 // architecture address width
module gpio #( parameter integer N = 24, // number of gpio pins
parameter integer AW = 32, // architecture address width
parameter integer PW = 104 // packet width
)
(
input nreset, // asynchronous active low reset
Expand All @@ -29,9 +29,6 @@ module gpio #(
//################################
//# wires/regs/ params
//################################

//local parameters
localparam integer PW = 2*AW+40; // packet width

//registers
reg [N-1:0] gpio_dir;
Expand Down Expand Up @@ -66,7 +63,8 @@ module gpio #(
//# DECODE LOGIC
//################################

packet2emesh #(.AW(AW))
packet2emesh #(.AW(AW),
.PW(PW))
p2e(
/*AUTOINST*/
// Outputs
Expand Down Expand Up @@ -212,7 +210,8 @@ module gpio #(
default : read_data[AW-1:0] <='b0;
endcase // case (dstaddr_in[7:3])

emesh_readback #(.AW(AW))
emesh_readback #(.AW(AW),
.PW(PW))
emesh_readback (/*AUTOINST*/
// Outputs
.wait_out (wait_out),
Expand All @@ -223,7 +222,7 @@ module gpio #(
.clk (clk),
.access_in (access_in),
.packet_in (packet_in[PW-1:0]),
.read_data (read_data[AW-1:0]),
.read_data (read_data[63:0]),
.wait_in (wait_in));

endmodule // gpio
Expand Down

0 comments on commit 363a5cf

Please sign in to comment.