mirror of https://github.com/YosysHQ/yosys.git
Merge remote-tracking branch 'origin/eddie/ram32x1d' into xc7mux
This commit is contained in:
commit
f1675b88f6
|
@ -289,6 +289,23 @@ module FDPE_1 (output reg Q, input C, CE, D, PRE);
|
||||||
always @(negedge C, posedge PRE) if (PRE) Q <= 1'b1; else if (CE) Q <= D;
|
always @(negedge C, posedge PRE) if (PRE) Q <= 1'b1; else if (CE) Q <= D;
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
module RAM32X1D (
|
||||||
|
output DPO, SPO,
|
||||||
|
input D, WCLK, WE,
|
||||||
|
input A0, A1, A2, A3, A4,
|
||||||
|
input DPRA0, DPRA1, DPRA2, DPRA3, DPRA4,
|
||||||
|
);
|
||||||
|
parameter INIT = 32'h0;
|
||||||
|
parameter IS_WCLK_INVERTED = 1'b0;
|
||||||
|
wire [4:0] a = {A4, A3, A2, A1, A0};
|
||||||
|
wire [4:0] dpra = {DPRA4, DPRA3, DPRA2, DPRA1, DPRA0};
|
||||||
|
reg [31:0] mem = INIT;
|
||||||
|
assign SPO = mem[a];
|
||||||
|
assign DPO = mem[dpra];
|
||||||
|
wire clk = WCLK ^ IS_WCLK_INVERTED;
|
||||||
|
always @(posedge clk) if (WE) mem[a] <= D;
|
||||||
|
endmodule
|
||||||
|
|
||||||
module RAM64X1D (
|
module RAM64X1D (
|
||||||
output DPO, SPO,
|
output DPO, SPO,
|
||||||
input D, WCLK, WE,
|
input D, WCLK, WE,
|
||||||
|
|
|
@ -120,7 +120,7 @@ function xtract_cell_decl()
|
||||||
xtract_cell_decl RAM128X1S
|
xtract_cell_decl RAM128X1S
|
||||||
xtract_cell_decl RAM256X1S
|
xtract_cell_decl RAM256X1S
|
||||||
xtract_cell_decl RAM32M
|
xtract_cell_decl RAM32M
|
||||||
xtract_cell_decl RAM32X1D
|
#xtract_cell_decl RAM32X1D
|
||||||
xtract_cell_decl RAM32X1S
|
xtract_cell_decl RAM32X1S
|
||||||
xtract_cell_decl RAM32X1S_1
|
xtract_cell_decl RAM32X1S_1
|
||||||
xtract_cell_decl RAM32X2S
|
xtract_cell_decl RAM32X2S
|
||||||
|
|
|
@ -3694,13 +3694,6 @@ module RAM32M (...);
|
||||||
input WE;
|
input WE;
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
module RAM32X1D (...);
|
|
||||||
parameter [31:0] INIT = 32'h00000000;
|
|
||||||
parameter [0:0] IS_WCLK_INVERTED = 1'b0;
|
|
||||||
output DPO, SPO;
|
|
||||||
input A0, A1, A2, A3, A4, D, DPRA0, DPRA1, DPRA2, DPRA3, DPRA4, WCLK, WE;
|
|
||||||
endmodule
|
|
||||||
|
|
||||||
module RAM32X1S (...);
|
module RAM32X1S (...);
|
||||||
parameter [31:0] INIT = 32'h00000000;
|
parameter [31:0] INIT = 32'h00000000;
|
||||||
parameter [0:0] IS_WCLK_INVERTED = 1'b0;
|
parameter [0:0] IS_WCLK_INVERTED = 1'b0;
|
||||||
|
|
|
@ -1,4 +1,17 @@
|
||||||
|
|
||||||
|
bram $__XILINX_RAM32X1D
|
||||||
|
init 1
|
||||||
|
abits 5
|
||||||
|
dbits 1
|
||||||
|
groups 2
|
||||||
|
ports 1 1
|
||||||
|
wrmode 0 1
|
||||||
|
enable 0 1
|
||||||
|
transp 0 0
|
||||||
|
clocks 0 1
|
||||||
|
clkpol 0 2
|
||||||
|
endbram
|
||||||
|
|
||||||
bram $__XILINX_RAM64X1D
|
bram $__XILINX_RAM64X1D
|
||||||
init 1
|
init 1
|
||||||
abits 6
|
abits 6
|
||||||
|
@ -25,6 +38,13 @@ bram $__XILINX_RAM128X1D
|
||||||
clkpol 0 2
|
clkpol 0 2
|
||||||
endbram
|
endbram
|
||||||
|
|
||||||
|
match $__XILINX_RAM32X1D
|
||||||
|
min bits 3
|
||||||
|
min wports 1
|
||||||
|
make_outreg
|
||||||
|
or_next_if_better
|
||||||
|
endmatch
|
||||||
|
|
||||||
match $__XILINX_RAM64X1D
|
match $__XILINX_RAM64X1D
|
||||||
min bits 5
|
min bits 5
|
||||||
min wports 1
|
min wports 1
|
||||||
|
|
|
@ -1,4 +1,38 @@
|
||||||
|
|
||||||
|
module \$__XILINX_RAM32X1D (CLK1, A1ADDR, A1DATA, B1ADDR, B1DATA, B1EN);
|
||||||
|
parameter [31:0] INIT = 32'bx;
|
||||||
|
parameter CLKPOL2 = 1;
|
||||||
|
input CLK1;
|
||||||
|
|
||||||
|
input [4:0] A1ADDR;
|
||||||
|
output A1DATA;
|
||||||
|
|
||||||
|
input [4:0] B1ADDR;
|
||||||
|
input B1DATA;
|
||||||
|
input B1EN;
|
||||||
|
|
||||||
|
RAM32X1D #(
|
||||||
|
.INIT(INIT),
|
||||||
|
.IS_WCLK_INVERTED(!CLKPOL2)
|
||||||
|
) _TECHMAP_REPLACE_ (
|
||||||
|
.DPRA0(A1ADDR[0]),
|
||||||
|
.DPRA1(A1ADDR[1]),
|
||||||
|
.DPRA2(A1ADDR[2]),
|
||||||
|
.DPRA3(A1ADDR[3]),
|
||||||
|
.DPRA4(A1ADDR[4]),
|
||||||
|
.DPO(A1DATA),
|
||||||
|
|
||||||
|
.A0(B1ADDR[0]),
|
||||||
|
.A1(B1ADDR[1]),
|
||||||
|
.A2(B1ADDR[2]),
|
||||||
|
.A3(B1ADDR[3]),
|
||||||
|
.A4(B1ADDR[4]),
|
||||||
|
.D(B1DATA),
|
||||||
|
.WCLK(CLK1),
|
||||||
|
.WE(B1EN)
|
||||||
|
);
|
||||||
|
endmodule
|
||||||
|
|
||||||
module \$__XILINX_RAM64X1D (CLK1, A1ADDR, A1DATA, B1ADDR, B1DATA, B1EN);
|
module \$__XILINX_RAM64X1D (CLK1, A1ADDR, A1DATA, B1ADDR, B1DATA, B1EN);
|
||||||
parameter [63:0] INIT = 64'bx;
|
parameter [63:0] INIT = 64'bx;
|
||||||
parameter CLKPOL2 = 1;
|
parameter CLKPOL2 = 1;
|
||||||
|
|
Loading…
Reference in New Issue