Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Virtex2 pro dual port block ram

Status
Not open for further replies.

mawais

Junior Member level 2
Joined
Mar 4, 2009
Messages
20
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,281
Activity points
1,433
Hi I am currently working with virtex 2 pro fpga and want to use the dual port ram, the problem I am having is that in simulation it shows right results while when I synthesize my program it does not work accordingly. I have varified this that the problem is only due to the use of dual port ram otherwise the program responds properly. I just want to verify that the code for the dual port line buffer is ok or not which is as under. Its very urgent please help me. Thanks in advance.
best regards,
Muhammad Awais
Code:
entity line_buffer_8b_DP is
    Port (clk : in  STD_LOGIC
			idata1 : in  STD_LOGIC_VECTOR (7 downto 0); -- input data port
			idata2 : in  STD_LOGIC_VECTOR (7 downto 0); -- input data port
			P1 : in STD_LOGIC_VECTOR (10 downto 0); -- reference to a memory location
			P2 : in STD_LOGIC_VECTOR (10 downto 0); -- reference to a memory location
			ena : in  STD_LOGIC; -- must be high to enable shifting of data
			enb : in  STD_LOGIC; -- must be high to enable shifting of data
			odata1 : out  STD_LOGIC_VECTOR (7 downto 0); -- output data port
			odata2 : out  STD_LOGIC_VECTOR (7 downto 0); -- output data port
			);
end line_buffer_8b_DP;

architecture Behavioral of line_buffer_8b_DP is

begin

RAMB16_S9_S9_inst : RAMB16_S9_S9
   generic map (
      INIT_A => X"000", --  Value of output RAM registers at startup
      INIT_B => X"000", --  Value of output RAM registers at startup
      SRVAL_A => X"000", --  Ouput value upon SSR assertion
      SRVAL_B => X"000", --  Ouput value upon SSR assertion
      WRITE_MODE_A => "READ_FIRST", --  WRITE_FIRST, READ_FIRST or NO_CHANGE
      WRITE_MODE_B => "READ_FIRST", --  WRITE_FIRST, READ_FIRST or NO_CHANGE
      -- The following INIT_xx declarations specify the initial contents of the RAM
      -- Address 0 to 511
      INIT_00 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_01 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_02 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_03 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_04 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_05 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_06 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_07 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_08 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_09 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_0A => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_0B => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_0C => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_0D => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_0E => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_0F => X"0000000000000000000000000000000000000000000000000000000000000000",
      -- Address 512 to 1023
      INIT_10 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_11 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_12 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_13 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_14 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_15 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_16 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_17 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_18 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_19 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_1A => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_1B => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_1C => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_1D => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_1E => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_1F => X"0000000000000000000000000000000000000000000000000000000000000000",
      -- Address 1024 to 1535
      INIT_20 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_21 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_22 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_23 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_24 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_25 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_26 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_27 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_28 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_29 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_2A => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_2B => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_2C => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_2D => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_2E => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_2F => X"0000000000000000000000000000000000000000000000000000000000000000",
      -- Address 1536 to 2047
      INIT_30 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_31 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_32 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_33 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_34 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_35 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_36 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_37 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_38 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_39 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_3A => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_3B => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_3C => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_3D => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_3E => X"0000000000000000000000000000000000000000000000000000000000000000",
      INIT_3F => X"0000000000000000000000000000000000000000000000000000000000000000",
      -- The next set of INITP_xx are for the parity bits
      -- Address 0 to 511
      INITP_00 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INITP_01 => X"0000000000000000000000000000000000000000000000000000000000000000",
      -- Address 512 to 1023
      INITP_02 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INITP_03 => X"0000000000000000000000000000000000000000000000000000000000000000",
      -- Address 1024 to 1535
      INITP_04 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INITP_05 => X"0000000000000000000000000000000000000000000000000000000000000000",
      -- Address 1536 to 2047
      INITP_06 => X"0000000000000000000000000000000000000000000000000000000000000000",
      INITP_07 => X"0000000000000000000000000000000000000000000000000000000000000000")
 port map (
	DIA     => idata1, -- insert 8 bits data in bus (<7 downto 0>)
	DIPA    => "0", -- insert 1 bit parity data in bus (or <8 downto 8>)
	ADDRA   => P1, -- insert 11 bits address bus        
	ENA     => ena, -- insert enable signal
	WEA     => '1', -- insert write enable signal
	SSRA    => '0', -- insert set/reset signal
	CLKA    => clk, -- insert clock signal
	DOA     => odata1, -- insert 8 bits data out bus (<7 downto 0>)
	DOPA    => open, -- insert 1 bit parity data out bus (or <8 downto 8>)
--
	DIB     => idata2, -- insert 8 bits data in bus (<7 downto 0>)
	DIPB    => "0", -- insert 1 bit parity data in bus (or <8 downto 8>)
	ADDRB   => P2, -- insert 11 bits address bus        
	ENB     => enb, -- insert enable signal
	WEB     => '0', -- insert write enable signal
	SSRB    => '0', -- insert set/reset signal
	CLKB    => clk , -- insert clock signal
	DOB     => odata2, -- insert 8 bits data out bus (<7 downto 0>)
	DOPB    => open  -- insert 1 bit parity data out bus (or <8 downto 8>)
	);	
end Behavioral;


Hi I want to add that, I have taken the above code from the link
**broken link removed**
page 548-549

also that I am using same clock source for both ports is it OK. OR should i take two clock sources the original to port A and the other its inverted version to the other port B. Please help me.
waiting for reply
best regards,
Muhammad Awais.
Code:
Code:
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top