1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-30 08:32:52 +08:00

Add FPGA ID register

This commit is contained in:
Alex Forencich 2019-11-17 12:46:27 -08:00
parent 445f80e6f2
commit 489506e4c0
12 changed files with 24 additions and 0 deletions

View File

@ -60,6 +60,8 @@ MQNIC_REG_IF_COUNT = 0x0020
MQNIC_REG_IF_STRIDE = 0x0024
MQNIC_REG_IF_CSR_OFFSET = 0x002C
MQNIC_REG_FPGA_ID = 0x0040
MQNIC_REG_GPIO_OUT = 0x0100
MQNIC_REG_GPIO_IN = 0x0104

View File

@ -276,6 +276,7 @@ parameter FW_ID = 32'd0;
parameter FW_VER = {16'd0, 16'd1};
parameter BOARD_ID = {16'h4144, 16'h9003};
parameter BOARD_VER = {16'd0, 16'd1};
parameter FPGA_ID = 32'h4B39093;
// Structural parameters
parameter IF_COUNT = 2;
@ -657,6 +658,7 @@ always @(posedge clk_250mhz) begin
16'h0020: axil_csr_rdata_reg <= IF_COUNT; // if_count
16'h0024: axil_csr_rdata_reg <= 2**IF_AXIL_ADDR_WIDTH; // if_stride
16'h002C: axil_csr_rdata_reg <= 2**AXIL_CSR_ADDR_WIDTH; // if_csr_offset
16'h0040: axil_csr_rdata_reg <= FPGA_ID; // fpga_id
// GPIO
16'h0100: begin
// GPIO out

View File

@ -276,6 +276,7 @@ parameter FW_ID = 32'd0;
parameter FW_VER = {16'd0, 16'd1};
parameter BOARD_ID = {16'h4144, 16'h9003};
parameter BOARD_VER = {16'd0, 16'd1};
parameter FPGA_ID = 32'h4B39093;
// Structural parameters
parameter IF_COUNT = 2;
@ -657,6 +658,7 @@ always @(posedge clk_250mhz) begin
16'h0020: axil_csr_rdata_reg <= IF_COUNT; // if_count
16'h0024: axil_csr_rdata_reg <= 2**IF_AXIL_ADDR_WIDTH; // if_stride
16'h002C: axil_csr_rdata_reg <= 2**AXIL_CSR_ADDR_WIDTH; // if_csr_offset
16'h0040: axil_csr_rdata_reg <= FPGA_ID; // fpga_id
// GPIO
16'h0100: begin
// GPIO out

View File

@ -201,6 +201,7 @@ parameter FW_ID = 32'd0;
parameter FW_VER = {16'd0, 16'd1};
parameter BOARD_ID = {16'h1ce4, 16'h0003};
parameter BOARD_VER = {16'd0, 16'd1};
parameter FPGA_ID = 32'h3823093;
// Structural parameters
parameter IF_COUNT = 2;
@ -606,6 +607,7 @@ always @(posedge clk_250mhz) begin
16'h0020: axil_csr_rdata_reg <= IF_COUNT; // if_count
16'h0024: axil_csr_rdata_reg <= 2**IF_AXIL_ADDR_WIDTH; // if_stride
16'h002C: axil_csr_rdata_reg <= 2**AXIL_CSR_ADDR_WIDTH; // if_csr_offset
16'h0040: axil_csr_rdata_reg <= FPGA_ID; // fpga_id
// GPIO
16'h0100: begin
// GPIO out

View File

@ -201,6 +201,7 @@ parameter FW_ID = 32'd0;
parameter FW_VER = {16'd0, 16'd1};
parameter BOARD_ID = {16'h1ce4, 16'h0009};
parameter BOARD_VER = {16'd0, 16'd1};
parameter FPGA_ID = 32'h4A63093;
// Structural parameters
parameter IF_COUNT = 2;
@ -606,6 +607,7 @@ always @(posedge clk_250mhz) begin
16'h0020: axil_csr_rdata_reg <= IF_COUNT; // if_count
16'h0024: axil_csr_rdata_reg <= 2**IF_AXIL_ADDR_WIDTH; // if_stride
16'h002C: axil_csr_rdata_reg <= 2**AXIL_CSR_ADDR_WIDTH; // if_csr_offset
16'h0040: axil_csr_rdata_reg <= FPGA_ID; // fpga_id
// GPIO
16'h0100: begin
// GPIO out

View File

@ -229,6 +229,7 @@ parameter FW_ID = 32'd0;
parameter FW_VER = {16'd0, 16'd1};
parameter BOARD_ID = {16'h10ee, 16'h806c};
parameter BOARD_VER = {16'd0, 16'd1};
parameter FPGA_ID = 32'h3842093;
// Structural parameters
parameter IF_COUNT = 1;
@ -638,6 +639,7 @@ always @(posedge clk_250mhz) begin
16'h0020: axil_csr_rdata_reg <= IF_COUNT; // if_count
16'h0024: axil_csr_rdata_reg <= 2**IF_AXIL_ADDR_WIDTH; // if_stride
16'h002C: axil_csr_rdata_reg <= 2**AXIL_CSR_ADDR_WIDTH; // if_csr_offset
16'h0040: axil_csr_rdata_reg <= FPGA_ID; // fpga_id
// GPIO
16'h0100: begin
// GPIO out

View File

@ -266,6 +266,7 @@ parameter FW_ID = 32'd0;
parameter FW_VER = {16'd0, 16'd1};
parameter BOARD_ID = {16'h10ee, 16'h9076};
parameter BOARD_VER = {16'd0, 16'd1};
parameter FPGA_ID = 32'h4B31093;
// Structural parameters
parameter IF_COUNT = 2;
@ -641,6 +642,7 @@ always @(posedge clk_250mhz) begin
16'h0020: axil_csr_rdata_reg <= IF_COUNT; // if_count
16'h0024: axil_csr_rdata_reg <= 2**IF_AXIL_ADDR_WIDTH; // if_stride
16'h002C: axil_csr_rdata_reg <= 2**AXIL_CSR_ADDR_WIDTH; // if_csr_offset
16'h0040: axil_csr_rdata_reg <= FPGA_ID; // fpga_id
// GPIO
16'h0100: begin
// GPIO out

View File

@ -276,6 +276,7 @@ parameter FW_ID = 32'd0;
parameter FW_VER = {16'd0, 16'd1};
parameter BOARD_ID = {16'h4144, 16'h9003};
parameter BOARD_VER = {16'd0, 16'd1};
parameter FPGA_ID = 32'h4B39093;
// Structural parameters
parameter IF_COUNT = 2;
@ -657,6 +658,7 @@ always @(posedge clk_250mhz) begin
16'h0020: axil_csr_rdata_reg <= IF_COUNT; // if_count
16'h0024: axil_csr_rdata_reg <= 2**IF_AXIL_ADDR_WIDTH; // if_stride
16'h002C: axil_csr_rdata_reg <= 2**AXIL_CSR_ADDR_WIDTH; // if_csr_offset
16'h0040: axil_csr_rdata_reg <= FPGA_ID; // fpga_id
// GPIO
16'h0100: begin
// GPIO out

View File

@ -201,6 +201,7 @@ parameter FW_ID = 32'd0;
parameter FW_VER = {16'd0, 16'd1};
parameter BOARD_ID = {16'h1ce4, 16'h0003};
parameter BOARD_VER = {16'd0, 16'd1};
parameter FPGA_ID = 32'h3823093;
// Structural parameters
parameter IF_COUNT = 2;
@ -606,6 +607,7 @@ always @(posedge clk_250mhz) begin
16'h0020: axil_csr_rdata_reg <= IF_COUNT; // if_count
16'h0024: axil_csr_rdata_reg <= 2**IF_AXIL_ADDR_WIDTH; // if_stride
16'h002C: axil_csr_rdata_reg <= 2**AXIL_CSR_ADDR_WIDTH; // if_csr_offset
16'h0040: axil_csr_rdata_reg <= FPGA_ID; // fpga_id
// GPIO
16'h0100: begin
// GPIO out

View File

@ -229,6 +229,7 @@ parameter FW_ID = 32'd0;
parameter FW_VER = {16'd0, 16'd1};
parameter BOARD_ID = {16'h10ee, 16'h806c};
parameter BOARD_VER = {16'd0, 16'd1};
parameter FPGA_ID = 32'h3842093;
// Structural parameters
parameter IF_COUNT = 1;
@ -638,6 +639,7 @@ always @(posedge clk_250mhz) begin
16'h0020: axil_csr_rdata_reg <= IF_COUNT; // if_count
16'h0024: axil_csr_rdata_reg <= 2**IF_AXIL_ADDR_WIDTH; // if_stride
16'h002C: axil_csr_rdata_reg <= 2**AXIL_CSR_ADDR_WIDTH; // if_csr_offset
16'h0040: axil_csr_rdata_reg <= FPGA_ID; // fpga_id
// GPIO
16'h0100: begin
// GPIO out

View File

@ -266,6 +266,7 @@ parameter FW_ID = 32'd0;
parameter FW_VER = {16'd0, 16'd1};
parameter BOARD_ID = {16'h10ee, 16'h9076};
parameter BOARD_VER = {16'd0, 16'd1};
parameter FPGA_ID = 32'h4B31093;
// Structural parameters
parameter IF_COUNT = 2;
@ -641,6 +642,7 @@ always @(posedge clk_250mhz) begin
16'h0020: axil_csr_rdata_reg <= IF_COUNT; // if_count
16'h0024: axil_csr_rdata_reg <= 2**IF_AXIL_ADDR_WIDTH; // if_stride
16'h002C: axil_csr_rdata_reg <= 2**AXIL_CSR_ADDR_WIDTH; // if_csr_offset
16'h0040: axil_csr_rdata_reg <= FPGA_ID; // fpga_id
// GPIO
16'h0100: begin
// GPIO out

View File

@ -66,6 +66,8 @@ either expressed or implied, of The Regents of the University of California.
#define MQNIC_REG_IF_STRIDE 0x0024
#define MQNIC_REG_IF_CSR_OFFSET 0x002C
#define MQNIC_REG_FPGA_ID 0x0040
#define MQNIC_REG_GPIO_OUT 0x0100
#define MQNIC_REG_GPIO_IN 0x0104