mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-03 02:05:21 +00:00
Merge branch 'main' of github.com:davidharrishmc/riscv-wally into main
This commit is contained in:
commit
13561c67bd
@ -49,8 +49,8 @@
|
|||||||
`define UARCH_SUPERSCALR 0
|
`define UARCH_SUPERSCALR 0
|
||||||
`define UARCH_SINGLECYCLE 0
|
`define UARCH_SINGLECYCLE 0
|
||||||
// *** replace with MEM_BUS
|
// *** replace with MEM_BUS
|
||||||
`define DMEM `MEM_CACHE
|
`define DMEM `MEM_BUS
|
||||||
`define IMEM `MEM_CACHE
|
`define IMEM `MEM_BUS
|
||||||
`define VIRTMEM_SUPPORTED 0
|
`define VIRTMEM_SUPPORTED 0
|
||||||
`define VECTORED_INTERRUPTS_SUPPORTED 0
|
`define VECTORED_INTERRUPTS_SUPPORTED 0
|
||||||
|
|
||||||
|
1
pipelined/src/cache/sram1rw.sv
vendored
1
pipelined/src/cache/sram1rw.sv
vendored
@ -46,6 +46,7 @@ module sram1rw #(parameter DEPTH=128, WIDTH=256) (
|
|||||||
logic WriteEnableD;
|
logic WriteEnableD;
|
||||||
|
|
||||||
//*** model as single port
|
//*** model as single port
|
||||||
|
// *** merge with simpleram
|
||||||
always_ff @(posedge clk) begin
|
always_ff @(posedge clk) begin
|
||||||
AddrD <= Adr;
|
AddrD <= Adr;
|
||||||
WriteDataD <= WriteData; /// ****** this is not right. there should not need to be a delay. Implement alternative cache stall to avoid this. Eliminates a bunch of delay flops elsewhere
|
WriteDataD <= WriteData; /// ****** this is not right. there should not need to be a delay. Implement alternative cache stall to avoid this. Eliminates a bunch of delay flops elsewhere
|
||||||
|
@ -40,18 +40,14 @@ module simpleram #(parameter BASE=0, RANGE = 65535) (
|
|||||||
|
|
||||||
logic [`XLEN-1:0] RAM[BASE>>(1+`XLEN/32):(RANGE+BASE)>>1+(`XLEN/32)];
|
logic [`XLEN-1:0] RAM[BASE>>(1+`XLEN/32):(RANGE+BASE)>>1+(`XLEN/32)];
|
||||||
|
|
||||||
/* verilator lint_off WIDTH */
|
// discard bottom 2 or 3 bits of address offset within word or doubleword
|
||||||
if (`XLEN == 64) begin:ramrw
|
localparam adrlsb = (`XLEN==64) ? 3 : 2;
|
||||||
always_ff @(posedge clk) begin
|
logic [31:adrlsb] adrmsbs;
|
||||||
rd <= RAM[a[31:3]];
|
assign adrmsbs = a[31:adrlsb];
|
||||||
if (we) RAM[a[31:3]] <= #1 wd;
|
|
||||||
end
|
always_ff @(posedge clk) begin
|
||||||
end else begin
|
rd <= RAM[adrmsbs];
|
||||||
always_ff @(posedge clk) begin:ramrw
|
if (we) RAM[adrmsbs] <= #1 wd;
|
||||||
rd <= RAM[a[31:2]];
|
|
||||||
if (we) RAM[a[31:2]] <= #1 wd;
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
/* verilator lint_on WIDTH */
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user