Add loopback design files and update project configurations
- Created a new loopback design file (loopback.bda) with nodes and edges defined in GraphML format. - Added a new Vivado project file for loopback (loopback.xpr) with updated configurations. - Introduced a new testbench for image convolution (img_conv_tb.vhd) in the simulation sources. - Updated the main project file (lab2.xpr) to reflect changes in source files and top module for simulation. - Removed obsolete project files (pak_depak.xpr.zip) and updated paths for existing source files.
This commit is contained in:
128
LAB2/vivado/lab2/lab2.srcs/sim_1/new/img_conv_tb.vhd
Normal file
128
LAB2/vivado/lab2/lab2.srcs/sim_1/new/img_conv_tb.vhd
Normal file
@@ -0,0 +1,128 @@
|
||||
----------------------------------------------------------------------------------
|
||||
-- Company:
|
||||
-- Engineer:
|
||||
--
|
||||
-- Create Date: 03/16/2025 04:23:36 PM
|
||||
-- Design Name:
|
||||
-- Module Name: img_conv_tb - Behavioral
|
||||
-- Project Name:
|
||||
-- Target Devices:
|
||||
-- Tool Versions:
|
||||
-- Description:
|
||||
--
|
||||
-- Dependencies:
|
||||
--
|
||||
-- Revision:
|
||||
-- Revision 0.01 - File Created
|
||||
-- Additional Comments:
|
||||
--
|
||||
----------------------------------------------------------------------------------
|
||||
|
||||
|
||||
library IEEE;
|
||||
use IEEE.STD_LOGIC_1164.ALL;
|
||||
|
||||
-- Uncomment the following library declaration if using
|
||||
-- arithmetic functions with Signed or Unsigned values
|
||||
use IEEE.NUMERIC_STD.ALL;
|
||||
|
||||
-- Uncomment the following library declaration if instantiating
|
||||
-- any Xilinx leaf cells in this code.
|
||||
--library UNISIM;
|
||||
--use UNISIM.VComponents.all;
|
||||
|
||||
entity img_conv_tb is
|
||||
-- Port ( );
|
||||
end img_conv_tb;
|
||||
|
||||
architecture Behavioral of img_conv_tb is
|
||||
|
||||
component img_conv is
|
||||
generic(
|
||||
LOG2_N_COLS: POSITIVE :=8;
|
||||
LOG2_N_ROWS: POSITIVE :=8
|
||||
);
|
||||
port (
|
||||
|
||||
clk : in std_logic;
|
||||
aresetn : in std_logic;
|
||||
|
||||
m_axis_tdata : out std_logic_vector(7 downto 0);
|
||||
m_axis_tvalid : out std_logic;
|
||||
m_axis_tready : in std_logic;
|
||||
m_axis_tlast : out std_logic;
|
||||
|
||||
conv_addr: out std_logic_vector(LOG2_N_COLS+LOG2_N_ROWS-1 downto 0);
|
||||
conv_data: in std_logic_vector(6 downto 0);
|
||||
|
||||
start_conv: in std_logic;
|
||||
done_conv: out std_logic
|
||||
|
||||
);
|
||||
end component;
|
||||
|
||||
constant LOG2_N_COLS: POSITIVE :=2;
|
||||
constant LOG2_N_ROWS: POSITIVE :=2;
|
||||
|
||||
type mem_type is array(0 to (2**LOG2_N_COLS)*(2**LOG2_N_ROWS)-1) of std_logic_vector(6 downto 0);
|
||||
|
||||
signal mem : mem_type := (0=>"0000001",others => (others => '0'));
|
||||
|
||||
signal clk : std_logic :='0';
|
||||
signal aresetn : std_logic :='0';
|
||||
|
||||
signal m_axis_tdata : std_logic_vector(7 downto 0);
|
||||
signal m_axis_tvalid : std_logic;
|
||||
signal m_axis_tready : std_logic;
|
||||
signal m_axis_tlast : std_logic;
|
||||
|
||||
signal conv_addr: std_logic_vector(LOG2_N_COLS+LOG2_N_ROWS-1 downto 0);
|
||||
signal conv_data: std_logic_vector(6 downto 0);
|
||||
|
||||
signal start_conv: std_logic;
|
||||
signal done_conv: std_logic;
|
||||
|
||||
begin
|
||||
|
||||
m_axis_tready<='1';
|
||||
|
||||
clk <= not clk after 5 ns;
|
||||
|
||||
process (clk)
|
||||
begin
|
||||
if(rising_edge(clk)) then
|
||||
conv_data<=mem(to_integer(unsigned(conv_addr)));
|
||||
end if;
|
||||
end process;
|
||||
|
||||
img_conv_inst: img_conv
|
||||
generic map(
|
||||
LOG2_N_COLS => LOG2_N_COLS,
|
||||
LOG2_N_ROWS => LOG2_N_ROWS
|
||||
)
|
||||
port map(
|
||||
clk => clk,
|
||||
aresetn => aresetn,
|
||||
m_axis_tdata => m_axis_tdata,
|
||||
m_axis_tvalid => m_axis_tvalid,
|
||||
m_axis_tready => m_axis_tready,
|
||||
m_axis_tlast => m_axis_tlast,
|
||||
conv_addr => conv_addr,
|
||||
conv_data => conv_data,
|
||||
start_conv => start_conv,
|
||||
done_conv => done_conv
|
||||
);
|
||||
|
||||
process
|
||||
begin
|
||||
wait for 10 ns;
|
||||
aresetn<='1';
|
||||
wait until rising_edge(clk);
|
||||
start_conv<='1';
|
||||
wait until rising_edge(clk);
|
||||
start_conv<='0';
|
||||
wait;
|
||||
end process;
|
||||
|
||||
|
||||
end Behavioral;
|
||||
@@ -77,13 +77,7 @@
|
||||
<FileSets Version="1" Minor="31">
|
||||
<FileSet Name="sources_1" Type="DesignSrcs" RelSrcDir="$PSRCDIR/sources_1" RelGenDir="$PGENDIR/sources_1">
|
||||
<Filter Type="Srcs"/>
|
||||
<File Path="$PPRDIR/../../src/bram_controller.vhd">
|
||||
<FileInfo>
|
||||
<Attr Name="UsedIn" Val="synthesis"/>
|
||||
<Attr Name="UsedIn" Val="simulation"/>
|
||||
</FileInfo>
|
||||
</File>
|
||||
<File Path="$PPRDIR/../../src/bram_writer.vhd">
|
||||
<File Path="$PPRDIR/../../src/packetizer.vhd">
|
||||
<FileInfo>
|
||||
<Attr Name="UsedIn" Val="synthesis"/>
|
||||
<Attr Name="UsedIn" Val="simulation"/>
|
||||
@@ -107,7 +101,13 @@
|
||||
<Attr Name="UsedIn" Val="simulation"/>
|
||||
</FileInfo>
|
||||
</File>
|
||||
<File Path="$PPRDIR/../../src/packetizer.vhd">
|
||||
<File Path="$PPRDIR/../../src/bram_controller.vhd">
|
||||
<FileInfo>
|
||||
<Attr Name="UsedIn" Val="synthesis"/>
|
||||
<Attr Name="UsedIn" Val="simulation"/>
|
||||
</FileInfo>
|
||||
</File>
|
||||
<File Path="$PPRDIR/../../src/bram_writer.vhd">
|
||||
<FileInfo>
|
||||
<Attr Name="UsedIn" Val="synthesis"/>
|
||||
<Attr Name="UsedIn" Val="simulation"/>
|
||||
@@ -157,13 +157,16 @@
|
||||
</FileSet>
|
||||
<FileSet Name="sim_1" Type="SimulationSrcs" RelSrcDir="$PSRCDIR/sim_1" RelGenDir="$PGENDIR/sim_1">
|
||||
<Filter Type="Srcs"/>
|
||||
<File Path="$PSRCDIR/sim_1/new/img_conv_tb.vhd">
|
||||
<FileInfo>
|
||||
<Attr Name="UsedIn" Val="synthesis"/>
|
||||
<Attr Name="UsedIn" Val="simulation"/>
|
||||
</FileInfo>
|
||||
</File>
|
||||
<Config>
|
||||
<Option Name="DesignMode" Val="RTL"/>
|
||||
<Option Name="TopModule" Val="bram_writer"/>
|
||||
<Option Name="TopModule" Val="img_conv_tb"/>
|
||||
<Option Name="TopLib" Val="xil_defaultlib"/>
|
||||
<Option Name="TopArchitecture" Val="rtl"/>
|
||||
<Option Name="TopRTLFile" Val="$PPRDIR/../../src/bram_writer.vhd"/>
|
||||
<Option Name="TopAutoSet" Val="TRUE"/>
|
||||
<Option Name="TransportPathDelay" Val="0"/>
|
||||
<Option Name="TransportIntDelay" Val="0"/>
|
||||
<Option Name="SelectedSimModel" Val="rtl"/>
|
||||
|
||||
Reference in New Issue
Block a user