mirror of
https://github.com/aolofsson/oh.git
synced 2025-01-30 02:32:53 +08:00
Changing block name to avoid conflict with "soft" constraints
This commit is contained in:
parent
5258c5c357
commit
46310f842e
@ -37,11 +37,9 @@ module oh_memory_sp
|
||||
);
|
||||
|
||||
generate
|
||||
if(SYN == "TRUE") begin: soft
|
||||
//#########################################
|
||||
// Generic RAM for synthesis
|
||||
//#########################################
|
||||
//local variables
|
||||
|
||||
if(SYN == "TRUE") begin: rtl
|
||||
// Generic RTL RAM
|
||||
reg [N-1:0] ram [0:DEPTH-1];
|
||||
wire [N-1:0] rdata;
|
||||
integer i;
|
||||
@ -51,10 +49,11 @@ module oh_memory_sp
|
||||
for (i=0;i<N;i=i+1)
|
||||
if (en & wem[i])
|
||||
ram[addr[AW-1:0]][i] <= din[i];
|
||||
|
||||
//read port
|
||||
assign rdata[N-1:0] = ram[addr[AW-1:0]];
|
||||
|
||||
//Configurable output register
|
||||
//configurable output register
|
||||
reg [N-1:0] rd_reg;
|
||||
always @ (posedge clk)
|
||||
if(en)
|
||||
@ -63,8 +62,9 @@ module oh_memory_sp
|
||||
//Drive output from register or RAM directly
|
||||
assign dout[N-1:0] = (REG==1) ? rd_reg[N-1:0] : rdata[N-1:0];
|
||||
|
||||
end
|
||||
end // block: rtl
|
||||
else begin: hard
|
||||
// Hard macro ASIC RAM
|
||||
asic_memory_sp #(.N(N),
|
||||
.DEPTH(DEPTH),
|
||||
.SHAPE(SHAPE),
|
||||
|
Loading…
x
Reference in New Issue
Block a user