Memories¶
Same as the VHDL version, we did used IPs to define the memories.
IPs¶
ram¶
ram.v
ram module
ALTERA
Ports¶
Ports list 9 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
aclr |
Input |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
byteena_a |
Input |
|
|
|
Combinatorial |
- |
Fanout : 0 |
clock |
Input |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
data |
Input |
|
|
|
Combinatorial |
- |
Fanout : 0 |
enable |
Input |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
rdaddress |
Input |
|
|
|
Combinatorial |
- |
Fanout : 0 |
wraddress |
Input |
|
|
|
Combinatorial |
- |
Fanout : 0 |
wren |
Input |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
q |
Output |
|
|
|
Combinatorial |
- |
Fanout : 0 |
Modules¶
Modules 1 element
• altsyncram : altsyncram_component ALTERA
Connections :
aclr
⮂wraddress
⮂rdaddress
⮂byteena_a
⮂clock
⮂enable
⮂data
⮂wren
⮂sub_wire0
⮂1'b0
⮂1'b0
⮂1'b0
⮂1'b1
⮂1'b1
⮂1'b1
⮂1'b1
⮂1'b1
⮂{32{1'b1}}
⮂1'b1
⮂1'b1
⮂1'b0
⮂Signals¶
Signals list 7 elements
Name |
Description |
Type |
Size |
Kind |
Fanout |
|---|---|---|---|---|---|
aclr |
synopsys translate_off |
|
- |
Combinatorial |
Fanout : 0 |
byteena_a |
|
|
|
Combinatorial |
Fanout : 0 |
clock |
|
|
- |
Combinatorial |
Fanout : 0 |
enable |
|
|
- |
Combinatorial |
Fanout : 0 |
wren |
|
|
- |
Combinatorial |
Fanout : 0 |
sub_wire0 |
synopsys translate_on |
|
|
Combinatorial |
Fanout : 0 |
q |
|
|
|
Combinatorial |
Fanout : 0 |
Instantiation templates¶
Instantiation templates 2 elements
ram <name> (
.aclr (i_aclr),
.byteena_a (i_byteena_a),
.clock (i_clock),
.data (i_data),
.enable (i_enable),
.rdaddress (i_rdaddress),
.wraddress (i_wraddress),
.wren (i_wren),
.q (i_q)
);
<name>: entity work.ram
port map (
aclr => i_aclr,
byteena_a => i_byteena_a,
clock => i_clock,
data => i_data,
enable => i_enable,
rdaddress => i_rdaddress,
wraddress => i_wraddress,
wren => i_wren,
q => i_q
);
Source¶
Raw source Full file
// megafunction wizard: %RAM: 2-PORT%
// GENERATION: STANDARD
// VERSION: WM1.0
// MODULE: altsyncram
// ============================================================
// File Name: ram.v
// Megafunction Name(s):
// altsyncram
//
// Simulation Library Files(s):
// altera_mf
// ============================================================
// ************************************************************
// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
//
// 24.1std.0 Build 1077 03/04/2025 SC Lite Edition
// ************************************************************
//Copyright (C) 2025 Altera Corporation. All rights reserved.
//Your use of Altera Corporation's design tools, logic functions
//and other software and tools, and any partner logic
//functions, and any output files from any of the foregoing
//(including device programming or simulation files), and any
//associated documentation or information are expressly subject
//to the terms and conditions of the Altera Program License
//Subscription Agreement, the Altera Quartus Prime License Agreement,
//the Altera IP License Agreement, or other applicable license
//agreement, including, without limitation, that your use is for
//the sole purpose of programming logic devices manufactured by
//Altera and sold by Altera or its authorized distributors. Please
//refer to the Altera Software License Subscription Agreements
//on the Quartus Prime software download page.
// synopsys translate_off
`timescale 1 ps / 1 ps
// synopsys translate_on
module ram (
aclr,
byteena_a,
clock,
data,
enable,
rdaddress,
wraddress,
wren,
q);
input aclr;
input [3:0] byteena_a;
input clock;
input [31:0] data;
input enable;
input [14:0] rdaddress;
input [14:0] wraddress;
input wren;
output [31:0] q;
`ifndef ALTERA_RESERVED_QIS
// synopsys translate_off
`endif
tri0 aclr;
tri1 [3:0] byteena_a;
tri1 clock;
tri1 enable;
tri0 wren;
`ifndef ALTERA_RESERVED_QIS
// synopsys translate_on
`endif
wire [31:0] sub_wire0;
wire [31:0] q = sub_wire0[31:0];
altsyncram altsyncram_component (
.aclr0 (aclr),
.address_a (wraddress),
.address_b (rdaddress),
.byteena_a (byteena_a),
.clock0 (clock),
.clocken0 (enable),
.data_a (data),
.wren_a (wren),
.q_b (sub_wire0),
.aclr1 (1'b0),
.addressstall_a (1'b0),
.addressstall_b (1'b0),
.byteena_b (1'b1),
.clock1 (1'b1),
.clocken1 (1'b1),
.clocken2 (1'b1),
.clocken3 (1'b1),
.data_b ({32{1'b1}}),
.eccstatus (),
.q_a (),
.rden_a (1'b1),
.rden_b (1'b1),
.wren_b (1'b0));
defparam
altsyncram_component.address_aclr_b = "CLEAR0",
altsyncram_component.address_reg_b = "CLOCK0",
altsyncram_component.byte_size = 8,
altsyncram_component.clock_enable_input_a = "NORMAL",
altsyncram_component.clock_enable_input_b = "NORMAL",
altsyncram_component.clock_enable_output_b = "NORMAL",
altsyncram_component.init_file = "build/ram.mif",
altsyncram_component.intended_device_family = "MAX 10",
altsyncram_component.lpm_type = "altsyncram",
altsyncram_component.numwords_a = 24576,
altsyncram_component.numwords_b = 24576,
altsyncram_component.operation_mode = "DUAL_PORT",
altsyncram_component.outdata_aclr_b = "CLEAR0",
altsyncram_component.outdata_reg_b = "CLOCK0",
altsyncram_component.power_up_uninitialized = "FALSE",
altsyncram_component.read_during_write_mode_mixed_ports = "DONT_CARE",
altsyncram_component.widthad_a = 15,
altsyncram_component.widthad_b = 15,
altsyncram_component.width_a = 32,
altsyncram_component.width_b = 32,
altsyncram_component.width_byteena_a = 4;
endmodule
// ============================================================
// CNX file retrieval info
// ============================================================
// Retrieval info: PRIVATE: ADDRESSSTALL_A NUMERIC "0"
// Retrieval info: PRIVATE: ADDRESSSTALL_B NUMERIC "0"
// Retrieval info: PRIVATE: BYTEENA_ACLR_A NUMERIC "0"
// Retrieval info: PRIVATE: BYTEENA_ACLR_B NUMERIC "0"
// Retrieval info: PRIVATE: BYTE_ENABLE_A NUMERIC "1"
// Retrieval info: PRIVATE: BYTE_ENABLE_B NUMERIC "0"
// Retrieval info: PRIVATE: BYTE_SIZE NUMERIC "8"
// Retrieval info: PRIVATE: BlankMemory NUMERIC "0"
// Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_A NUMERIC "1"
// Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_B NUMERIC "1"
// Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_A NUMERIC "0"
// Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_B NUMERIC "1"
// Retrieval info: PRIVATE: CLRdata NUMERIC "0"
// Retrieval info: PRIVATE: CLRq NUMERIC "1"
// Retrieval info: PRIVATE: CLRrdaddress NUMERIC "1"
// Retrieval info: PRIVATE: CLRrren NUMERIC "0"
// Retrieval info: PRIVATE: CLRwraddress NUMERIC "0"
// Retrieval info: PRIVATE: CLRwren NUMERIC "0"
// Retrieval info: PRIVATE: Clock NUMERIC "0"
// Retrieval info: PRIVATE: Clock_A NUMERIC "0"
// Retrieval info: PRIVATE: Clock_B NUMERIC "0"
// Retrieval info: PRIVATE: IMPLEMENT_IN_LES NUMERIC "0"
// Retrieval info: PRIVATE: INDATA_ACLR_B NUMERIC "0"
// Retrieval info: PRIVATE: INDATA_REG_B NUMERIC "0"
// Retrieval info: PRIVATE: INIT_FILE_LAYOUT STRING "PORT_B"
// Retrieval info: PRIVATE: INIT_TO_SIM_X NUMERIC "0"
// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "MAX 10"
// Retrieval info: PRIVATE: JTAG_ENABLED NUMERIC "0"
// Retrieval info: PRIVATE: JTAG_ID STRING "NONE"
// Retrieval info: PRIVATE: MAXIMUM_DEPTH NUMERIC "0"
// Retrieval info: PRIVATE: MEMSIZE NUMERIC "1572864"
// Retrieval info: PRIVATE: MEM_IN_BITS NUMERIC "0"
// Retrieval info: PRIVATE: MIFfilename STRING "mem.mif"
// Retrieval info: PRIVATE: OPERATION_MODE NUMERIC "2"
// Retrieval info: PRIVATE: OUTDATA_ACLR_B NUMERIC "1"
// Retrieval info: PRIVATE: OUTDATA_REG_B NUMERIC "1"
// Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
// Retrieval info: PRIVATE: READ_DURING_WRITE_MODE_MIXED_PORTS NUMERIC "2"
// Retrieval info: PRIVATE: READ_DURING_WRITE_MODE_PORT_A NUMERIC "3"
// Retrieval info: PRIVATE: READ_DURING_WRITE_MODE_PORT_B NUMERIC "3"
// Retrieval info: PRIVATE: REGdata NUMERIC "1"
// Retrieval info: PRIVATE: REGq NUMERIC "1"
// Retrieval info: PRIVATE: REGrdaddress NUMERIC "1"
// Retrieval info: PRIVATE: REGrren NUMERIC "1"
// Retrieval info: PRIVATE: REGwraddress NUMERIC "1"
// Retrieval info: PRIVATE: REGwren NUMERIC "1"
// Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
// Retrieval info: PRIVATE: USE_DIFF_CLKEN NUMERIC "0"
// Retrieval info: PRIVATE: UseDPRAM NUMERIC "1"
// Retrieval info: PRIVATE: VarWidth NUMERIC "0"
// Retrieval info: PRIVATE: WIDTH_READ_A NUMERIC "32"
// Retrieval info: PRIVATE: WIDTH_READ_B NUMERIC "32"
// Retrieval info: PRIVATE: WIDTH_WRITE_A NUMERIC "32"
// Retrieval info: PRIVATE: WIDTH_WRITE_B NUMERIC "32"
// Retrieval info: PRIVATE: WRADDR_ACLR_B NUMERIC "0"
// Retrieval info: PRIVATE: WRADDR_REG_B NUMERIC "0"
// Retrieval info: PRIVATE: WRCTRL_ACLR_B NUMERIC "0"
// Retrieval info: PRIVATE: enable NUMERIC "1"
// Retrieval info: PRIVATE: rden NUMERIC "0"
// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
// Retrieval info: CONSTANT: ADDRESS_ACLR_B STRING "CLEAR0"
// Retrieval info: CONSTANT: ADDRESS_REG_B STRING "CLOCK0"
// Retrieval info: CONSTANT: BYTE_SIZE NUMERIC "8"
// Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_A STRING "NORMAL"
// Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_B STRING "NORMAL"
// Retrieval info: CONSTANT: CLOCK_ENABLE_OUTPUT_B STRING "NORMAL"
// Retrieval info: CONSTANT: INIT_FILE STRING "mem.mif"
// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "MAX 10"
// Retrieval info: CONSTANT: LPM_TYPE STRING "altsyncram"
// Retrieval info: CONSTANT: NUMWORDS_A NUMERIC "49152"
// Retrieval info: CONSTANT: NUMWORDS_B NUMERIC "49152"
// Retrieval info: CONSTANT: OPERATION_MODE STRING "DUAL_PORT"
// Retrieval info: CONSTANT: OUTDATA_ACLR_B STRING "CLEAR0"
// Retrieval info: CONSTANT: OUTDATA_REG_B STRING "CLOCK0"
// Retrieval info: CONSTANT: POWER_UP_UNINITIALIZED STRING "FALSE"
// Retrieval info: CONSTANT: READ_DURING_WRITE_MODE_MIXED_PORTS STRING "DONT_CARE"
// Retrieval info: CONSTANT: WIDTHAD_A NUMERIC "16"
// Retrieval info: CONSTANT: WIDTHAD_B NUMERIC "16"
// Retrieval info: CONSTANT: WIDTH_A NUMERIC "32"
// Retrieval info: CONSTANT: WIDTH_B NUMERIC "32"
// Retrieval info: CONSTANT: WIDTH_BYTEENA_A NUMERIC "4"
// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT GND "aclr"
// Retrieval info: USED_PORT: byteena_a 0 0 4 0 INPUT VCC "byteena_a[3..0]"
// Retrieval info: USED_PORT: clock 0 0 0 0 INPUT VCC "clock"
// Retrieval info: USED_PORT: data 0 0 32 0 INPUT NODEFVAL "data[31..0]"
// Retrieval info: USED_PORT: enable 0 0 0 0 INPUT VCC "enable"
// Retrieval info: USED_PORT: q 0 0 32 0 OUTPUT NODEFVAL "q[31..0]"
// Retrieval info: USED_PORT: rdaddress 0 0 16 0 INPUT NODEFVAL "rdaddress[15..0]"
// Retrieval info: USED_PORT: wraddress 0 0 16 0 INPUT NODEFVAL "wraddress[15..0]"
// Retrieval info: USED_PORT: wren 0 0 0 0 INPUT GND "wren"
// Retrieval info: CONNECT: @aclr0 0 0 0 0 aclr 0 0 0 0
// Retrieval info: CONNECT: @address_a 0 0 16 0 wraddress 0 0 16 0
// Retrieval info: CONNECT: @address_b 0 0 16 0 rdaddress 0 0 16 0
// Retrieval info: CONNECT: @byteena_a 0 0 4 0 byteena_a 0 0 4 0
// Retrieval info: CONNECT: @clock0 0 0 0 0 clock 0 0 0 0
// Retrieval info: CONNECT: @clocken0 0 0 0 0 enable 0 0 0 0
// Retrieval info: CONNECT: @data_a 0 0 32 0 data 0 0 32 0
// Retrieval info: CONNECT: @wren_a 0 0 0 0 wren 0 0 0 0
// Retrieval info: CONNECT: q 0 0 32 0 @q_b 0 0 32 0
// Retrieval info: GEN_FILE: TYPE_NORMAL ram.v TRUE
// Retrieval info: GEN_FILE: TYPE_NORMAL ram.inc FALSE
// Retrieval info: GEN_FILE: TYPE_NORMAL ram.cmp FALSE
// Retrieval info: GEN_FILE: TYPE_NORMAL ram.bsf FALSE
// Retrieval info: GEN_FILE: TYPE_NORMAL ram_inst.v FALSE
// Retrieval info: GEN_FILE: TYPE_NORMAL ram_bb.v TRUE
// Retrieval info: LIB_FILE: altera_mf
rom¶
rom.v
rom module
ALTERA
Ports¶
Ports list 9 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
aclr |
Input |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
clock |
Input |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
enable |
Input |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
address 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
address_a |
Input |
|
|
|
Combinatorial |
- |
Fanout : 0 |
address_b |
Input |
|
|
|
Combinatorial |
Negative |
Fanout : 0 |
rden 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
rden_a |
Input |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
rden_b |
Input |
|
|
- |
Combinatorial |
Negative |
Fanout : 0 |
q 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
q_a |
Output |
|
|
|
Combinatorial |
- |
Fanout : 0 |
q_b |
Output |
|
|
|
Combinatorial |
Negative |
Fanout : 0 |
Modules¶
Modules 1 element
• altsyncram : altsyncram_component ALTERA
Connections :
aclr
⮂address_a
⮂address_b
⮂clock
⮂enable
⮂sub_wire0
⮂sub_wire0
⮂rden_a
⮂rden_b
⮂sub_wire1
⮂sub_wire1
⮂sub_wire2
⮂sub_wire3
⮂Signals¶
Signals list 11 elements
Name |
Description |
Type |
Size |
Kind |
Fanout |
|---|---|---|---|---|---|
aclr |
synopsys translate_off |
|
- |
Combinatorial |
Fanout : 0 |
clock |
|
|
- |
Combinatorial |
Fanout : 0 |
enable |
|
|
- |
Combinatorial |
Fanout : 0 |
rden 2 elements
Name |
Description |
Type |
Size |
Kind |
Fanout |
|---|---|---|---|---|---|
rden_a |
|
|
- |
Combinatorial |
Fanout : 0 |
rden_b |
|
|
- |
Combinatorial |
Fanout : 0 |
sub 4 elements
Name |
Description |
Type |
Size |
Kind |
Fanout |
|---|---|---|---|---|---|
sub_wire0 |
synopsys translate_on |
|
|
Combinatorial |
Fanout : 0 |
sub_wire1 |
|
|
- |
Combinatorial |
Fanout : 0 |
sub_wire2 |
|
|
|
Combinatorial |
Fanout : 0 |
sub_wire3 |
|
|
|
Combinatorial |
Fanout : 0 |
q 2 elements
Name |
Description |
Type |
Size |
Kind |
Fanout |
|---|---|---|---|---|---|
q_a |
|
|
|
Combinatorial |
Fanout : 0 |
q_b |
|
|
|
Combinatorial |
Fanout : 0 |
Instantiation templates¶
Instantiation templates 2 elements
rom <name> (
.aclr (i_aclr),
.address_a (i_address_a),
.address_b (i_address_b),
.clock (i_clock),
.enable (i_enable),
.rden_a (i_rden_a),
.rden_b (i_rden_b),
.q_a (i_q_a),
.q_b (i_q_b)
);
<name>: entity work.rom
port map (
aclr => i_aclr,
address_a => i_address_a,
address_b => i_address_b,
clock => i_clock,
enable => i_enable,
rden_a => i_rden_a,
rden_b => i_rden_b,
q_a => i_q_a,
q_b => i_q_b
);
Source¶
Raw source Full file
// megafunction wizard: %ROM: 2-PORT%
// GENERATION: STANDARD
// VERSION: WM1.0
// MODULE: altsyncram
// ============================================================
// File Name: rom.v
// Megafunction Name(s):
// altsyncram
//
// Simulation Library Files(s):
// altera_mf
// ============================================================
// ************************************************************
// THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
//
// 24.1std.0 Build 1077 03/04/2025 SC Lite Edition
// ************************************************************
//Copyright (C) 2025 Altera Corporation. All rights reserved.
//Your use of Altera Corporation's design tools, logic functions
//and other software and tools, and any partner logic
//functions, and any output files from any of the foregoing
//(including device programming or simulation files), and any
//associated documentation or information are expressly subject
//to the terms and conditions of the Altera Program License
//Subscription Agreement, the Altera Quartus Prime License Agreement,
//the Altera IP License Agreement, or other applicable license
//agreement, including, without limitation, that your use is for
//the sole purpose of programming logic devices manufactured by
//Altera and sold by Altera or its authorized distributors. Please
//refer to the Altera Software License Subscription Agreements
//on the Quartus Prime software download page.
// synopsys translate_off
`timescale 1 ps / 1 ps
// synopsys translate_on
module rom (
aclr,
address_a,
address_b,
clock,
enable,
rden_a,
rden_b,
q_a,
q_b);
input aclr;
input [15:0] address_a;
input [15:0] address_b;
input clock;
input enable;
input rden_a;
input rden_b;
output [31:0] q_a;
output [31:0] q_b;
`ifndef ALTERA_RESERVED_QIS
// synopsys translate_off
`endif
tri0 aclr;
tri1 clock;
tri1 enable;
tri1 rden_a;
tri1 rden_b;
`ifndef ALTERA_RESERVED_QIS
// synopsys translate_on
`endif
wire [31:0] sub_wire0 = 32'h0;
wire sub_wire1 = 1'h0;
wire [31:0] sub_wire2;
wire [31:0] sub_wire3;
wire [31:0] q_a = sub_wire2[31:0];
wire [31:0] q_b = sub_wire3[31:0];
altsyncram altsyncram_component (
.aclr0 (aclr),
.address_a (address_a),
.address_b (address_b),
.clock0 (clock),
.clocken0 (enable),
.data_a (sub_wire0),
.data_b (sub_wire0),
.rden_a (rden_a),
.rden_b (rden_b),
.wren_a (sub_wire1),
.wren_b (sub_wire1),
.q_a (sub_wire2),
.q_b (sub_wire3)
// synopsys translate_off
,
.aclr1 (),
.addressstall_a (),
.addressstall_b (),
.byteena_a (),
.byteena_b (),
.clock1 (),
.clocken1 (),
.clocken2 (),
.clocken3 (),
.eccstatus ()
// synopsys translate_on
);
defparam
altsyncram_component.address_reg_b = "CLOCK0",
altsyncram_component.clock_enable_input_a = "NORMAL",
altsyncram_component.clock_enable_input_b = "NORMAL",
altsyncram_component.clock_enable_output_a = "NORMAL",
altsyncram_component.clock_enable_output_b = "NORMAL",
altsyncram_component.indata_reg_b = "CLOCK0",
altsyncram_component.init_file = "build/rom.mif",
altsyncram_component.intended_device_family = "MAX 10",
altsyncram_component.lpm_type = "altsyncram",
altsyncram_component.numwords_a = 49152,
altsyncram_component.numwords_b = 49152,
altsyncram_component.operation_mode = "BIDIR_DUAL_PORT",
altsyncram_component.outdata_aclr_a = "CLEAR0",
altsyncram_component.outdata_aclr_b = "CLEAR0",
altsyncram_component.outdata_reg_a = "CLOCK0",
altsyncram_component.outdata_reg_b = "CLOCK0",
altsyncram_component.power_up_uninitialized = "FALSE",
altsyncram_component.widthad_a = 16,
altsyncram_component.widthad_b = 16,
altsyncram_component.width_a = 32,
altsyncram_component.width_b = 32,
altsyncram_component.width_byteena_a = 1,
altsyncram_component.width_byteena_b = 1,
altsyncram_component.wrcontrol_wraddress_reg_b = "CLOCK0";
endmodule
// ============================================================
// CNX file retrieval info
// ============================================================
// Retrieval info: PRIVATE: ADDRESSSTALL_A NUMERIC "0"
// Retrieval info: PRIVATE: ADDRESSSTALL_B NUMERIC "0"
// Retrieval info: PRIVATE: BYTEENA_ACLR_A NUMERIC "0"
// Retrieval info: PRIVATE: BYTEENA_ACLR_B NUMERIC "0"
// Retrieval info: PRIVATE: BYTE_ENABLE_A NUMERIC "0"
// Retrieval info: PRIVATE: BYTE_ENABLE_B NUMERIC "0"
// Retrieval info: PRIVATE: BYTE_SIZE NUMERIC "1"
// Retrieval info: PRIVATE: BlankMemory NUMERIC "0"
// Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_A NUMERIC "1"
// Retrieval info: PRIVATE: CLOCK_ENABLE_INPUT_B NUMERIC "1"
// Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_A NUMERIC "1"
// Retrieval info: PRIVATE: CLOCK_ENABLE_OUTPUT_B NUMERIC "1"
// Retrieval info: PRIVATE: CLRdata NUMERIC "0"
// Retrieval info: PRIVATE: CLRq NUMERIC "1"
// Retrieval info: PRIVATE: CLRrdaddress NUMERIC "0"
// Retrieval info: PRIVATE: CLRrren NUMERIC "0"
// Retrieval info: PRIVATE: CLRwraddress NUMERIC "0"
// Retrieval info: PRIVATE: CLRwren NUMERIC "0"
// Retrieval info: PRIVATE: Clock NUMERIC "0"
// Retrieval info: PRIVATE: Clock_A NUMERIC "0"
// Retrieval info: PRIVATE: Clock_B NUMERIC "0"
// Retrieval info: PRIVATE: IMPLEMENT_IN_LES NUMERIC "0"
// Retrieval info: PRIVATE: INDATA_ACLR_B NUMERIC "0"
// Retrieval info: PRIVATE: INDATA_REG_B NUMERIC "1"
// Retrieval info: PRIVATE: INIT_FILE_LAYOUT STRING "PORT_A"
// Retrieval info: PRIVATE: INIT_TO_SIM_X NUMERIC "0"
// Retrieval info: PRIVATE: INTENDED_DEVICE_FAMILY STRING "MAX 10"
// Retrieval info: PRIVATE: JTAG_ENABLED NUMERIC "0"
// Retrieval info: PRIVATE: JTAG_ID STRING "NONE"
// Retrieval info: PRIVATE: MAXIMUM_DEPTH NUMERIC "0"
// Retrieval info: PRIVATE: MEMSIZE NUMERIC "1572864"
// Retrieval info: PRIVATE: MEM_IN_BITS NUMERIC "0"
// Retrieval info: PRIVATE: MIFfilename STRING "mem.mif"
// Retrieval info: PRIVATE: OPERATION_MODE NUMERIC "3"
// Retrieval info: PRIVATE: OUTDATA_ACLR_B NUMERIC "1"
// Retrieval info: PRIVATE: OUTDATA_REG_B NUMERIC "1"
// Retrieval info: PRIVATE: RAM_BLOCK_TYPE NUMERIC "0"
// Retrieval info: PRIVATE: READ_DURING_WRITE_MODE_MIXED_PORTS NUMERIC "2"
// Retrieval info: PRIVATE: REGdata NUMERIC "1"
// Retrieval info: PRIVATE: REGq NUMERIC "1"
// Retrieval info: PRIVATE: REGrdaddress NUMERIC "0"
// Retrieval info: PRIVATE: REGrren NUMERIC "1"
// Retrieval info: PRIVATE: REGwraddress NUMERIC "1"
// Retrieval info: PRIVATE: REGwren NUMERIC "1"
// Retrieval info: PRIVATE: SYNTH_WRAPPER_GEN_POSTFIX STRING "0"
// Retrieval info: PRIVATE: USE_DIFF_CLKEN NUMERIC "0"
// Retrieval info: PRIVATE: UseDPRAM NUMERIC "1"
// Retrieval info: PRIVATE: VarWidth NUMERIC "0"
// Retrieval info: PRIVATE: WIDTH_READ_A NUMERIC "32"
// Retrieval info: PRIVATE: WIDTH_READ_B NUMERIC "32"
// Retrieval info: PRIVATE: WIDTH_WRITE_A NUMERIC "32"
// Retrieval info: PRIVATE: WIDTH_WRITE_B NUMERIC "32"
// Retrieval info: PRIVATE: WRADDR_ACLR_B NUMERIC "0"
// Retrieval info: PRIVATE: WRADDR_REG_B NUMERIC "1"
// Retrieval info: PRIVATE: WRCTRL_ACLR_B NUMERIC "0"
// Retrieval info: PRIVATE: enable NUMERIC "1"
// Retrieval info: PRIVATE: rden NUMERIC "1"
// Retrieval info: LIBRARY: altera_mf altera_mf.altera_mf_components.all
// Retrieval info: CONSTANT: ADDRESS_REG_B STRING "CLOCK0"
// Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_A STRING "NORMAL"
// Retrieval info: CONSTANT: CLOCK_ENABLE_INPUT_B STRING "NORMAL"
// Retrieval info: CONSTANT: CLOCK_ENABLE_OUTPUT_A STRING "NORMAL"
// Retrieval info: CONSTANT: CLOCK_ENABLE_OUTPUT_B STRING "NORMAL"
// Retrieval info: CONSTANT: INDATA_REG_B STRING "CLOCK0"
// Retrieval info: CONSTANT: INIT_FILE STRING "mem.mif"
// Retrieval info: CONSTANT: INTENDED_DEVICE_FAMILY STRING "MAX 10"
// Retrieval info: CONSTANT: LPM_TYPE STRING "altsyncram"
// Retrieval info: CONSTANT: NUMWORDS_A NUMERIC "49152"
// Retrieval info: CONSTANT: NUMWORDS_B NUMERIC "49152"
// Retrieval info: CONSTANT: OPERATION_MODE STRING "BIDIR_DUAL_PORT"
// Retrieval info: CONSTANT: OUTDATA_ACLR_A STRING "CLEAR0"
// Retrieval info: CONSTANT: OUTDATA_ACLR_B STRING "CLEAR0"
// Retrieval info: CONSTANT: OUTDATA_REG_A STRING "CLOCK0"
// Retrieval info: CONSTANT: OUTDATA_REG_B STRING "CLOCK0"
// Retrieval info: CONSTANT: POWER_UP_UNINITIALIZED STRING "FALSE"
// Retrieval info: CONSTANT: WIDTHAD_A NUMERIC "16"
// Retrieval info: CONSTANT: WIDTHAD_B NUMERIC "16"
// Retrieval info: CONSTANT: WIDTH_A NUMERIC "32"
// Retrieval info: CONSTANT: WIDTH_B NUMERIC "32"
// Retrieval info: CONSTANT: WIDTH_BYTEENA_A NUMERIC "1"
// Retrieval info: CONSTANT: WIDTH_BYTEENA_B NUMERIC "1"
// Retrieval info: CONSTANT: WRCONTROL_WRADDRESS_REG_B STRING "CLOCK0"
// Retrieval info: USED_PORT: aclr 0 0 0 0 INPUT GND "aclr"
// Retrieval info: USED_PORT: address_a 0 0 16 0 INPUT NODEFVAL "address_a[15..0]"
// Retrieval info: USED_PORT: address_b 0 0 16 0 INPUT NODEFVAL "address_b[15..0]"
// Retrieval info: USED_PORT: clock 0 0 0 0 INPUT VCC "clock"
// Retrieval info: USED_PORT: enable 0 0 0 0 INPUT VCC "enable"
// Retrieval info: USED_PORT: q_a 0 0 32 0 OUTPUT NODEFVAL "q_a[31..0]"
// Retrieval info: USED_PORT: q_b 0 0 32 0 OUTPUT NODEFVAL "q_b[31..0]"
// Retrieval info: USED_PORT: rden_a 0 0 0 0 INPUT VCC "rden_a"
// Retrieval info: USED_PORT: rden_b 0 0 0 0 INPUT VCC "rden_b"
// Retrieval info: CONNECT: @aclr0 0 0 0 0 aclr 0 0 0 0
// Retrieval info: CONNECT: @address_a 0 0 16 0 address_a 0 0 16 0
// Retrieval info: CONNECT: @address_b 0 0 16 0 address_b 0 0 16 0
// Retrieval info: CONNECT: @clock0 0 0 0 0 clock 0 0 0 0
// Retrieval info: CONNECT: @clocken0 0 0 0 0 enable 0 0 0 0
// Retrieval info: CONNECT: @data_a 0 0 32 0 GND 0 0 32 0
// Retrieval info: CONNECT: @data_b 0 0 32 0 GND 0 0 32 0
// Retrieval info: CONNECT: @rden_a 0 0 0 0 rden_a 0 0 0 0
// Retrieval info: CONNECT: @rden_b 0 0 0 0 rden_b 0 0 0 0
// Retrieval info: CONNECT: @wren_a 0 0 0 0 GND 0 0 0 0
// Retrieval info: CONNECT: @wren_b 0 0 0 0 GND 0 0 0 0
// Retrieval info: CONNECT: q_a 0 0 32 0 @q_a 0 0 32 0
// Retrieval info: CONNECT: q_b 0 0 32 0 @q_b 0 0 32 0
// Retrieval info: GEN_FILE: TYPE_NORMAL rom.v TRUE
// Retrieval info: GEN_FILE: TYPE_NORMAL rom.inc FALSE
// Retrieval info: GEN_FILE: TYPE_NORMAL rom.cmp FALSE
// Retrieval info: GEN_FILE: TYPE_NORMAL rom.bsf FALSE
// Retrieval info: GEN_FILE: TYPE_NORMAL rom_inst.v FALSE
// Retrieval info: GEN_FILE: TYPE_NORMAL rom_bb.v TRUE
// Retrieval info: LIB_FILE: altera_mf
Assemblies¶
mem_manager¶
mem_manager.sv
mem_manager module
Imports¶
Imports 1 element
core_config_pkg XLEN
Parameters¶
Parameters 2 elements
- • ADDR_BITS Type : logic Default : 16
How many address bits to pass through
- • ID_BITS Type : logic Default : 16'hFFFF
-
Ports¶
Ports list 20 elements
data 4 elements
in 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
data_in_a |
Input |
Port A signals (read/write port) |
|
|
Combinatorial |
- |
Fanout : 0 |
data_in_b |
Input |
Port B signals (typically read-only for instruction fetch) |
|
|
Combinatorial |
Negative |
Fanout : 0 |
out 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
data_out_a |
Output |
|
|
|
Combinatorial |
- |
Fanout : 0 |
data_out_b |
Output |
|
|
|
Combinatorial |
Negative |
Fanout : 0 |
byteen 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
byteen_in_a |
Input |
|
|
|
Combinatorial |
- |
Fanout : 0 |
byteen_out_a |
Output |
|
|
|
Combinatorial |
- |
Fanout : 0 |
addr 4 elements
in 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
addr_in_a |
Input |
|
|
|
Combinatorial |
- |
Fanout : 0 |
addr_in_b |
Input |
|
|
|
Combinatorial |
Negative |
Fanout : 0 |
out 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
addr_out_a |
Output |
|
|
|
Combinatorial |
- |
Fanout : 0 |
addr_out_b |
Output |
|
|
|
Combinatorial |
Negative |
Fanout : 0 |
aclr 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
aclr_in_a |
Input |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
aclr_out_a |
Output |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
enable 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
enable_in_a |
Input |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
enable_out_a |
Output |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
rden 4 elements
in 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
rden_in_a |
Input |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
rden_in_b |
Input |
|
|
- |
Combinatorial |
Negative |
Fanout : 0 |
out 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
rden_out_a |
Output |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
rden_out_b |
Output |
|
|
- |
Combinatorial |
Negative |
Fanout : 0 |
wren 2 elements
Name |
Direction |
Description |
Type |
Size |
Kind |
Polarity |
Fanout |
|---|---|---|---|---|---|---|---|
wren_in_a |
Input |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
wren_out_a |
Output |
|
|
- |
Combinatorial |
- |
Fanout : 0 |
Signals¶
Signals list 2 elements
select 2 elements
Name |
Description |
Type |
Size |
Kind |
Fanout |
|---|---|---|---|---|---|
select_a |
Internal enable signals for port A and B |
|
- |
Combinatorial |
Fanout : 0 |
select_b |
|
|
- |
Combinatorial |
Fanout : 0 |
Instantiation templates¶
Instantiation templates 2 elements
mem_manager <name> #(
.ADDR_BITS (16),
.ID_BITS (16'hFFFF)
)(
.data_in_a (i_data_in_a),
.data_out_a (i_data_out_a),
.byteen_in_a (i_byteen_in_a),
.byteen_out_a (i_byteen_out_a),
.addr_in_a (i_addr_in_a),
.addr_out_a (i_addr_out_a),
.aclr_in_a (i_aclr_in_a),
.aclr_out_a (i_aclr_out_a),
.enable_in_a (i_enable_in_a),
.enable_out_a (i_enable_out_a),
.rden_in_a (i_rden_in_a),
.rden_out_a (i_rden_out_a),
.wren_in_a (i_wren_in_a),
.wren_out_a (i_wren_out_a),
.data_in_b (i_data_in_b),
.data_out_b (i_data_out_b),
.addr_in_b (i_addr_in_b),
.addr_out_b (i_addr_out_b),
.rden_in_b (i_rden_in_b),
.rden_out_b (i_rden_out_b)
);
<name>: entity work.mem_manager
generic map (
ADDR_BITS => 16,
ID_BITS => 16'hFFFF
)
port map (
data_in_a => i_data_in_a,
data_out_a => i_data_out_a,
byteen_in_a => i_byteen_in_a,
byteen_out_a => i_byteen_out_a,
addr_in_a => i_addr_in_a,
addr_out_a => i_addr_out_a,
aclr_in_a => i_aclr_in_a,
aclr_out_a => i_aclr_out_a,
enable_in_a => i_enable_in_a,
enable_out_a => i_enable_out_a,
rden_in_a => i_rden_in_a,
rden_out_a => i_rden_out_a,
wren_in_a => i_wren_in_a,
wren_out_a => i_wren_out_a,
data_in_b => i_data_in_b,
data_out_b => i_data_out_b,
addr_in_b => i_addr_in_b,
addr_out_b => i_addr_out_b,
rden_in_b => i_rden_in_b,
rden_out_b => i_rden_out_b
);
Source¶
Raw source Full file
/*
* File : rtl/memory/assemblies/utils/mem_manager.sv
*
* Author : l.heywang <leonard.heywang@proton.me>
* Date : 16/11/2025
*
* Brief : This file define the memory manager, a block that trigger only if
* the address match a specific pattern. Does also provide an
* isolator to the write bus in the disabled state.
*/
`timescale 1ns / 1ps
import core_config_pkg::XLEN;
module mem_manager #(
parameter int ADDR_BITS = 16, // How many address bits to pass through
parameter logic [(XLEN - ADDR_BITS - 1):0] ID_BITS = 16'hFFFF // Address match pattern for upper bits
) (
// Port A signals (read/write port)
input logic [(XLEN - 1):0] data_in_a,
output logic [(XLEN - 1):0] data_out_a,
input logic [((XLEN / 4) - 1):0] byteen_in_a,
output logic [((XLEN / 4) - 1):0] byteen_out_a,
input logic [(XLEN - 1):0] addr_in_a,
output logic [(ADDR_BITS - 1):0] addr_out_a,
input logic aclr_in_a,
output logic aclr_out_a,
input logic enable_in_a,
output logic enable_out_a,
input logic rden_in_a,
output logic rden_out_a,
input logic wren_in_a,
output logic wren_out_a,
// Port B signals (typically read-only for instruction fetch)
input logic [(XLEN - 1):0] data_in_b,
output logic [(XLEN - 1):0] data_out_b,
input logic [(XLEN - 1):0] addr_in_b,
output logic [(ADDR_BITS - 1):0] addr_out_b,
input logic rden_in_b,
output logic rden_out_b
);
// Internal enable signals for port A and B
logic select_a;
logic select_b;
// Address decode logic - check if upper address bits match ID_BITS
assign select_a = (addr_in_a[(XLEN-1):(ADDR_BITS)] == ID_BITS) && enable_in_a;
assign select_b = (addr_in_b[(XLEN-1):(ADDR_BITS)] == ID_BITS);
// Port A outputs - pass through lower address bits
assign addr_out_a = addr_in_a[(ADDR_BITS-1):0];
// Port A control signals - only enable when address matches
assign enable_out_a = select_a;
assign rden_out_a = select_a && rden_in_a;
assign wren_out_a = select_a && wren_in_a;
assign aclr_out_a = aclr_in_a; // Pass through reset
// Port A byte enables - only pass through when selected
assign byteen_out_a = select_a ? byteen_in_a : '0;
// Port A data - pass through write data, gate read data
assign data_out_a = select_a ? data_in_a : '0; // For OR-tree: output zeros when not selected
// Port B outputs
assign addr_out_b = addr_in_b[(ADDR_BITS-1):0];
assign rden_out_b = select_b && rden_in_b;
// Port B data - gate read data for OR-tree
assign data_out_b = select_b ? data_in_b : '0;
endmodule