Hey Andy,
Thanks for the help.
I wrote the testbench below based on what you are saying.
However, I can't figure out how to get the memory model library to load. Once I have that figured out, I'll let you know.
Brad
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity toptb is end toptb;
architecture Behavioral of toptb is
component top3 port( x2clk : in std_logic ; reset_pin_in : in std_logic ; vga_hsync_out : out std_logic; vga_vsync_out : out std_logic; vga_rgb_red_out : out std_logic_vector(9 downto 0); vga_rgb_green_out : out std_logic_vector(9 downto 0); vga_rgb_blue_out : out std_logic_vector(9 downto 0); vga_clk_out : out std_logic; vga_synct_out : out std_logic; vga_sync_out : out std_logic; vga_blank_out : out std_logic; -- to SRAM sramclk : out std_logic; -- clock srama : out std_logic_vector(20 downto 0); -- address sramdqa : inout std_logic_vector(9 downto 1); -- data a sramdqb : inout std_logic_vector(9 downto 1); -- data b srame1 : out std_logic; -- chip enable 1 sramba : out std_logic; -- a data write enable srambb : out std_logic; -- b data write enable sramw : out std_logic; -- write enable -- from Xilinx U2 u2clk : in std_logic ; cam_line_in : in std_logic; -- via board VGADAT9 cam_data_in : in std_logic_vector(8 downto 0); -- TPA Switch tup_in : in std_logic; -- P198 tdown_in : in std_logic; -- P197 tleft_in : in std_logic; -- P194 tright_in : in std_logic; -- P196 tcenter_in : in std_logic; -- P199 -- Test led_out : out std_logic; test_out : out std_logic ); end component;
component G8320Z18T GENERIC ( CONSTANT ramtype : integer := 1; -- NBT=1 Burst=0 CONSTANT ramversion : integer := 1; -- 4->+1 RAM CONSTANT density : integer := 32; CONSTANT byteparl : integer := 4; CONSTANT A_size : integer := 21; CONSTANT DQ_size : integer := 9; CONSTANT bank_size : integer := 1024 * 2048;-- *32M /4 bytes in parallel CONSTANT tKQpipe : real := 3.4e+00 ;--166MHZ CONSTANT tKQflow : real := 8.0e+00) ;--166MHZ PORT ( SIGNAL A832 : IN std_logic_vector(A_size - 1 DOWNTO 0);-- address SIGNAL DQa : INOUT std_logic_vector(DQ_size DOWNTO 1) BUS;-- byte A data SIGNAL DQb : INOUT std_logic_vector(DQ_size DOWNTO 1) BUS;-- byte B data SIGNAL nBa : IN std_logic;-- bank A write enable SIGNAL nBb : IN std_logic;-- bank B write enable SIGNAL CK : IN std_logic;-- clock SIGNAL nCKE : IN std_logic;-- clock SIGNAL nW : IN std_logic;-- byte write enable SIGNAL nE1 : IN std_logic;-- chip enable 1 SIGNAL E2 : IN std_logic;-- chip enable 1 SIGNAL nE3 : IN std_logic;-- chip enable 1 SIGNAL nG : IN std_logic;-- output enable SIGNAL pADV : IN std_logic;-- Advance not / load SIGNAL ZZ : IN std_logic;-- power down SIGNAL nFT : IN std_logic;-- Pipeline / Flow through SIGNAL nLBO : IN std_logic);-- Linear Burst Order not end component;
signal sramclk : std_logic; -- clock signal srama : std_logic_vector(20 downto 0); -- address signal sramdqa : std_logic_vector(9 downto 1); -- data a signal sramdqb : std_logic_vector(9 downto 1); -- data b signal srame1 : std_logic; -- chip enable 1 signal sramba : std_logic; -- a data write enable signal srambb : std_logic; -- b data write enable signal sramw : std_logic; -- write enable
begin
u3_spartan3 : top3 port map( x2clk => x2clk, reset_pin_in => reset_pin_in, vga_hsync_out => vga_hsync_out, vga_vsync_out => vga_vsync_out, vga_rgb_red_out => vga_rgb_red_out, vga_rgb_green_out => vga_rgb_green_out, vga_rgb_blue_out => vga_rgb_blue_out, vga_clk_out => vga_clk_out, vga_synct_out => vga_synct_out, vga_sync_out => vga_sync_out, vga_blank_out => vga_blank_out, sramclk => sramclk, srama => srama, sramdqa => sramdqa, sramdqb => sramdqb, srame1 => srame1, sramba => sramba, srambb => srambb, sramw => sramw, u2clk => u2clk, cam_line_in => cam_line_in, cam_data_in => cam_data_in, tup_in => tup_in, tdown_in => tdown_in, tleft_in => tleft_in, tright_in => tright_in, tcenter_in => tcenter_in, led_out => led_out, test_out => test_out );
u21sram : G8320Z18T port map( A832 => srama, -- address DQa => sramdqa, -- byte A data DQb => sramdqb, -- byte B data nBa => sramba, -- bank A write enable nBb => srambb, -- bank B write enable CK => sramclk, -- clock nCKE => '0', -- clock enable nW => sramw, -- byte write enable nE1 => srame1, -- chip enable 1 E2 => '1', -- chip enable 1 nE3 => '0', -- chip enable 1 nG => '0', -- output enable pADV => '0', -- Advance not / load ZZ => '0', -- power down nFT => '1', -- Pipeline / Flow through nLBO => '0'); -- Linear Burst Order not
u2clk_proc : process is u2clk