Started work on fifo buffer

This commit is contained in:
Adam 2025-04-10 16:14:16 +02:00
parent fccf2dbba3
commit 44018d5827
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,50 @@
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.MATH_REAL.all;
use ieee.numeric_std.all;
library gan_ganimede;
use gan_ganimede.io_types.all;
library techmap;
use techmap.gencomp.all;
entity fifo_buffer is
generic (
data_width : natural := 32;
buffer_size : natural := 64
);
port (
ready_in : in std_logic;
ready_out : out std_logic;
valid_in : in std_logic;
valid_out : out std_logic;
data_in : in std_logic_vector(data_width - 1 downto 0);
data_out : out std_logic_vector(data_width - 1 downto 0)
);
end entity fifo_buffer;
architecture rtl of fifo_buffer is
signal read_pointer : natural range 0 to buffer_size - 1;
signal write_pointer : natural range 0 to buffer_size - 1;
begin
techmap_ram_inst : techmap.syncram_2p -- TODO figure out what all this means
generic map(tech => nx; abits : integer := 6; dbits : integer := 8;
sepclk : integer := 0; wrfst : integer := 0; testen : integer := 0;
words : integer := 0; custombits : integer := 1;
pipeline : integer range 0 to 15 := 0; rdhold : integer := 0);
port map(
rclk : in std_ulogic;
renable : in std_ulogic;
raddress : in std_logic_vector((abits -1) downto 0);
dataout : out std_logic_vector((dbits -1) downto 0);
wclk : in std_ulogic;
write : in std_ulogic;
waddress : in std_logic_vector((abits -1) downto 0);
datain : in std_logic_vector((dbits -1) downto 0);
testin : in std_logic_vector(TESTIN_WIDTH-1 downto 0) := testin_none;
customclk: in std_ulogic := '0';
customin : in std_logic_vector(custombits-1 downto 0) := (others => '0');
customout:out std_logic_vector(custombits-1 downto 0)
);
end architecture rtl;

View File

@ -16,6 +16,9 @@ gan_controller.files = [
gan_manager.files = [ gan_manager.files = [
'manager/*.vhd', 'manager/*.vhd',
] ]
gan_buffer.files = [
'fifo_buffer/*.vhd',
]
grlib.files = [ grlib.files = [
'grlib-com-nx-2024.4-b4295/lib/grlib/**/*.vhd', 'grlib-com-nx-2024.4-b4295/lib/grlib/**/*.vhd',
] ]