angjohn
Junior Member level 2
verilog lpm_ram_dq
can anyone help me translate following LPM_RAM_DQ module which is in VHDL into Verilog
this ram is target for altera MaxplusII software so can anyone help me out pls !!!!
can anyone help me translate following LPM_RAM_DQ module which is in VHDL into Verilog
Code:
-- LPM_RAM_DQ
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
entity LPM_RAM_DQ is
generic (
Note: note := "RAM with Separate Input and Output Ports";
LPM_WIDTH: integer := 16;
LPM_TYPE: string := "LPM_RAM_DQ";
LPM_WIDTHAD: integer := 9;
LPM_NUMWORDS: string := "UNUSED";
LPM_FILE: string := "UNUSED";
LPM_INDATA: string := "REGISTERED";
LPM_ADDRESS_CONTROL: string := "REGISTERED";
LPM_OUTDATA: string := "UNREGISTERED";
LPM_HINT: string := "UNUSED"
);
port (
DATA: in STD_LOGIC_VECTOR(LPM_WIDTH-1 downto 0);
ADDRESS: in STD_LOGIC_VECTOR(LPM_WIDTHAD-1 downto 0);
WE: in STD_LOGIC;-- := '1';
INCLOCK: in STD_LOGIC;-- := '0';
Q: out STD_LOGIC_VECTOR(LPM_WIDTH-1 downto 0)
);
type ENUM_LPM_INDATA is (REGISTERED, UNREGISTERED);
type ENUM_LPM_ADDRESS_CONTROL is (REGISTERED, UNREGISTERED);
type ENUM_LPM_OUTDATA is (REGISTERED, UNREGISTERED);
end LPM_RAM_DQ;
architecture LPM_RAM_DQ_arch of LPM_RAM_DQ is
begin
-- Enter concurrent statements here
end LPM_RAM_DQ_arch;
-- LPM_RAM_DQ: Predefined module ended here
-- DataRam
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.std_logic_arith.all;
entity DataRam is
port (
data : in STD_LOGIC_VECTOR(15 downto 0);
addr : in STD_LOGIC_VECTOR(8 downto 0);
CLK : in STD_LOGIC;
write : in STD_LOGIC;
Q : out STD_LOGIC_VECTOR(15 downto 0)
);
end DataRam;
architecture DataRam_arch of DataRam is
signal high, low, lpm_write, nclk : STD_LOGIC;
component LPM_RAM_DQ
generic (
LPM_WIDTH: integer := 16;
LPM_TYPE: string := "LPM_RAM_DQ";
LPM_WIDTHAD: integer := 9;
LPM_NUMWORDS: string := "UNUSED";
LPM_FILE: string := "UNUSED";
LPM_INDATA: string := "REGISTERED";
LPM_ADDRESS_CONTROL: string := "REGISTERED";
LPM_OUTDATA: string := "UNREGISTERED";
LPM_HINT: string := "UNUSED"
);
port (
DATA: in STD_LOGIC_VECTOR(LPM_WIDTH-1 downto 0);
ADDRESS: in STD_LOGIC_VECTOR(LPM_WIDTHAD-1 downto 0);
WE: in STD_LOGIC;-- := '1';
INCLOCK: in STD_LOGIC;-- := '0';
Q: out STD_LOGIC_VECTOR(LPM_WIDTH-1 downto 0)
);
end component;
begin
high<='1'; low<='0';
lpm_write <= write and clk;
nclk <= not clk;
U_LPM_RAM_DQ: LPM_RAM_DQ port map(data, addr, write, clk, Q);
end DataRam_arch;
this ram is target for altera MaxplusII software so can anyone help me out pls !!!!