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

merged changes in pcie

This commit is contained in:
Alex Forencich 2020-08-06 21:35:00 -07:00
commit 0b3d4e7e75
2 changed files with 7 additions and 3 deletions

View File

@ -167,7 +167,7 @@ initial begin
$finish;
end
if (AXIS_DATA_WIDTH*2**PART_COUNT_WIDTH != SEG_COUNT*SEG_DATA_WIDTH) begin
if (AXIS_DATA_WIDTH*2**$clog2(PART_COUNT) != SEG_COUNT*SEG_DATA_WIDTH) begin
$error("Error: AXI stream interface width must be a power of two fraction of RAM interface width (instance %m)");
$finish;
end
@ -310,7 +310,11 @@ always @* begin
ram_mask_next = {SEG_COUNT{1'b1}};
end
ram_wr_cmd_be_int = (s_axis_write_data_tkeep & keep_mask_reg) << (addr_reg & ({PART_COUNT_WIDTH{1'b1}} << PART_OFFSET_WIDTH));
if (PART_COUNT > 1) begin
ram_wr_cmd_be_int = (s_axis_write_data_tkeep & keep_mask_reg) << (addr_reg & ({PART_COUNT_WIDTH{1'b1}} << PART_OFFSET_WIDTH));
end else begin
ram_wr_cmd_be_int = s_axis_write_data_tkeep & keep_mask_reg;
end
ram_wr_cmd_addr_int = {SEG_COUNT{addr_reg[RAM_ADDR_WIDTH-1:RAM_ADDR_WIDTH-SEG_ADDR_WIDTH]}};
ram_wr_cmd_data_int = {PART_COUNT{s_axis_write_data_tdata}};
for (i = 0; i < SEG_COUNT; i = i + 1) begin

View File

@ -166,7 +166,7 @@ initial begin
$finish;
end
if (AXIS_DATA_WIDTH*2**PART_COUNT_WIDTH != SEG_COUNT*SEG_DATA_WIDTH) begin
if (AXIS_DATA_WIDTH*2**$clog2(PART_COUNT) != SEG_COUNT*SEG_DATA_WIDTH) begin
$error("Error: AXI stream interface width must be a power of two fraction of RAM interface width (instance %m)");
$finish;
end