diff --git a/.gitignore b/.gitignore
index 3653252..488d631 100644
--- a/.gitignore
+++ b/.gitignore
@@ -51,7 +51,6 @@
*.cache/
*.hw/
*.gen/
-*.srcs/
.hwdbg/
*.ip_user_files/
.webtalk/
diff --git a/LAB2/design/lab_2/hdl/lab_2_wrapper.vhd b/LAB2/design/lab_2/hdl/lab_2_wrapper.vhd
index 66259fa..f003f9f 100644
--- a/LAB2/design/lab_2/hdl/lab_2_wrapper.vhd
+++ b/LAB2/design/lab_2/hdl/lab_2_wrapper.vhd
@@ -1,7 +1,7 @@
--Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
----------------------------------------------------------------------------------
--Tool Version: Vivado v.2020.2 (win64) Build 3064766 Wed Nov 18 09:12:45 MST 2020
---Date : Fri Apr 25 00:08:55 2025
+--Date : Fri Apr 25 10:55:47 2025
--Host : DavideASUS running 64-bit major release (build 9200)
--Command : generate_target lab_2_wrapper.bd
--Design : lab_2_wrapper
diff --git a/LAB2/design/lab_2/lab_2.bd b/LAB2/design/lab_2/lab_2.bd
index 06b0187..992f836 100644
--- a/LAB2/design/lab_2/lab_2.bd
+++ b/LAB2/design/lab_2/lab_2.bd
@@ -1169,20 +1169,6 @@
}
},
"interface_nets": {
- "Conn": {
- "interface_ports": [
- "rgb2gray_0/s_axis",
- "depacketizer_0/m_axis",
- "system_ila_0/SLOT_0_AXIS"
- ]
- },
- "rgb2gray_0_m_axis": {
- "interface_ports": [
- "rgb2gray_0/m_axis",
- "bram_writer_0/s_axis",
- "system_ila_0/SLOT_2_AXIS"
- ]
- },
"img_conv_0_m_axis": {
"interface_ports": [
"img_conv_0/m_axis",
@@ -1207,6 +1193,20 @@
"packetizer_0/m_axis",
"AXI4Stream_UART_0/S00_AXIS_TX"
]
+ },
+ "Conn": {
+ "interface_ports": [
+ "rgb2gray_0/s_axis",
+ "depacketizer_0/m_axis",
+ "system_ila_0/SLOT_0_AXIS"
+ ]
+ },
+ "rgb2gray_0_m_axis": {
+ "interface_ports": [
+ "rgb2gray_0/m_axis",
+ "bram_writer_0/s_axis",
+ "system_ila_0/SLOT_2_AXIS"
+ ]
}
},
"nets": {
diff --git a/LAB2/design/lab_2/lab_2.bda b/LAB2/design/lab_2/lab_2.bda
index 8223b12..136d79c 100644
--- a/LAB2/design/lab_2/lab_2.bda
+++ b/LAB2/design/lab_2/lab_2.bda
@@ -26,17 +26,17 @@
VR
- lab_2
- BC
-
-
active
2
PM
-
+
+ lab_2
+ BC
+
+
-
+
diff --git a/LAB2/design/pak_depak/hdl/pak_depak_wrapper.vhd b/LAB2/design/loopback/hdl/loopback_wrapper.vhd
similarity index 75%
rename from LAB2/design/pak_depak/hdl/pak_depak_wrapper.vhd
rename to LAB2/design/loopback/hdl/loopback_wrapper.vhd
index 3c07af1..0d0056e 100644
--- a/LAB2/design/pak_depak/hdl/pak_depak_wrapper.vhd
+++ b/LAB2/design/loopback/hdl/loopback_wrapper.vhd
@@ -1,36 +1,36 @@
--Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
----------------------------------------------------------------------------------
--Tool Version: Vivado v.2020.2 (win64) Build 3064766 Wed Nov 18 09:12:45 MST 2020
---Date : Thu Apr 24 19:38:15 2025
+--Date : Fri Apr 25 10:52:31 2025
--Host : DavideASUS running 64-bit major release (build 9200)
---Command : generate_target pak_depak_wrapper.bd
---Design : pak_depak_wrapper
+--Command : generate_target loopback_wrapper.bd
+--Design : loopback_wrapper
--Purpose : IP block netlist
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
library UNISIM;
use UNISIM.VCOMPONENTS.ALL;
-entity pak_depak_wrapper is
+entity loopback_wrapper is
port (
reset : in STD_LOGIC;
sys_clock : in STD_LOGIC;
usb_uart_rxd : in STD_LOGIC;
usb_uart_txd : out STD_LOGIC
);
-end pak_depak_wrapper;
+end loopback_wrapper;
-architecture STRUCTURE of pak_depak_wrapper is
- component pak_depak is
+architecture STRUCTURE of loopback_wrapper is
+ component loopback is
port (
reset : in STD_LOGIC;
sys_clock : in STD_LOGIC;
usb_uart_txd : out STD_LOGIC;
usb_uart_rxd : in STD_LOGIC
);
- end component pak_depak;
+ end component loopback;
begin
-pak_depak_i: component pak_depak
+loopback_i: component loopback
port map (
reset => reset,
sys_clock => sys_clock,
diff --git a/LAB2/design/pak_depak/pak_depak.bd b/LAB2/design/loopback/loopback.bd
similarity index 95%
rename from LAB2/design/pak_depak/pak_depak.bd
rename to LAB2/design/loopback/loopback.bd
index b904ce5..ba5b071 100644
--- a/LAB2/design/pak_depak/pak_depak.bd
+++ b/LAB2/design/loopback/loopback.bd
@@ -3,7 +3,7 @@
"design_info": {
"boundary_crc": "0x9157799052A71E23",
"device": "xc7a35tcpg236-1",
- "name": "pak_depak",
+ "name": "loopback",
"rev_ctrl_bd_flag": "RevCtrlBdOff",
"synth_flow_mode": "Hierarchical",
"tool_version": "2020.2",
@@ -41,7 +41,7 @@
"direction": "I",
"parameters": {
"CLK_DOMAIN": {
- "value": "pak_depak_sys_clock",
+ "value": "loopback_sys_clock",
"value_src": "default"
},
"FREQ_HZ": {
@@ -64,8 +64,8 @@
"components": {
"proc_sys_reset_0": {
"vlnv": "xilinx.com:ip:proc_sys_reset:5.0",
- "xci_name": "pak_depak_proc_sys_reset_0_0",
- "xci_path": "ip\\pak_depak_proc_sys_reset_0_0\\pak_depak_proc_sys_reset_0_0.xci",
+ "xci_name": "loopback_proc_sys_reset_0_0",
+ "xci_path": "ip\\loopback_proc_sys_reset_0_0\\loopback_proc_sys_reset_0_0.xci",
"inst_hier_path": "proc_sys_reset_0",
"parameters": {
"RESET_BOARD_INTERFACE": {
@@ -78,8 +78,8 @@
},
"clk_wiz_0": {
"vlnv": "xilinx.com:ip:clk_wiz:6.0",
- "xci_name": "pak_depak_clk_wiz_0_0",
- "xci_path": "ip\\pak_depak_clk_wiz_0_0\\pak_depak_clk_wiz_0_0.xci",
+ "xci_name": "loopback_clk_wiz_0_0",
+ "xci_path": "ip\\loopback_clk_wiz_0_0\\loopback_clk_wiz_0_0.xci",
"inst_hier_path": "clk_wiz_0",
"parameters": {
"CLK_IN1_BOARD_INTERFACE": {
@@ -95,8 +95,8 @@
},
"AXI4Stream_UART_0": {
"vlnv": "DigiLAB:ip:AXI4Stream_UART:1.1",
- "xci_name": "pak_depak_AXI4Stream_UART_0_0",
- "xci_path": "ip\\pak_depak_AXI4Stream_UART_0_0\\pak_depak_AXI4Stream_UART_0_0.xci",
+ "xci_name": "loopback_AXI4Stream_UART_0_0",
+ "xci_path": "ip\\loopback_AXI4Stream_UART_0_0\\loopback_AXI4Stream_UART_0_0.xci",
"inst_hier_path": "AXI4Stream_UART_0",
"parameters": {
"UART_BOARD_INTERFACE": {
@@ -109,8 +109,8 @@
},
"packetizer_0": {
"vlnv": "xilinx.com:module_ref:packetizer:1.0",
- "xci_name": "pak_depak_packetizer_0_0",
- "xci_path": "ip\\pak_depak_packetizer_0_0\\pak_depak_packetizer_0_0.xci",
+ "xci_name": "loopback_packetizer_0_0",
+ "xci_path": "ip\\loopback_packetizer_0_0\\loopback_packetizer_0_0.xci",
"inst_hier_path": "packetizer_0",
"reference_info": {
"ref_type": "hdl",
@@ -296,8 +296,8 @@
},
"depacketizer_0": {
"vlnv": "xilinx.com:module_ref:depacketizer:1.0",
- "xci_name": "pak_depak_depacketizer_0_0",
- "xci_path": "ip\\pak_depak_depacketizer_0_0\\pak_depak_depacketizer_0_0.xci",
+ "xci_name": "loopback_depacketizer_0_0",
+ "xci_path": "ip\\loopback_depacketizer_0_0\\loopback_depacketizer_0_0.xci",
"inst_hier_path": "depacketizer_0",
"reference_info": {
"ref_type": "hdl",
@@ -489,12 +489,6 @@
"depacketizer_0/s_axis"
]
},
- "depacketizer_0_m_axis": {
- "interface_ports": [
- "depacketizer_0/m_axis",
- "packetizer_0/s_axis"
- ]
- },
"packetizer_0_m_axis": {
"interface_ports": [
"packetizer_0/m_axis",
@@ -506,6 +500,12 @@
"usb_uart",
"AXI4Stream_UART_0/UART"
]
+ },
+ "depacketizer_0_m_axis": {
+ "interface_ports": [
+ "depacketizer_0/m_axis",
+ "packetizer_0/s_axis"
+ ]
}
},
"nets": {
diff --git a/LAB2/design/pak_depak/pak_depak.bda b/LAB2/design/loopback/loopback.bda
similarity index 96%
rename from LAB2/design/pak_depak/pak_depak.bda
rename to LAB2/design/loopback/loopback.bda
index f02230c..5dee781 100644
--- a/LAB2/design/pak_depak/pak_depak.bda
+++ b/LAB2/design/loopback/loopback.bda
@@ -22,11 +22,11 @@
2
- pak_depak
+ loopback
VR
- pak_depak
+ loopback
BC
diff --git a/LAB2/vivado/archived/lab2.xpr.zip b/LAB2/vivado/archived/lab2.xpr.zip
index 0e7a710..eed7468 100644
Binary files a/LAB2/vivado/archived/lab2.xpr.zip and b/LAB2/vivado/archived/lab2.xpr.zip differ
diff --git a/LAB2/vivado/archived/loopback.xpr.zip b/LAB2/vivado/archived/loopback.xpr.zip
new file mode 100644
index 0000000..cb626a1
Binary files /dev/null and b/LAB2/vivado/archived/loopback.xpr.zip differ
diff --git a/LAB2/vivado/archived/pak_depak.xpr.zip b/LAB2/vivado/archived/pak_depak.xpr.zip
deleted file mode 100644
index 06ba8c5..0000000
Binary files a/LAB2/vivado/archived/pak_depak.xpr.zip and /dev/null differ
diff --git a/LAB2/vivado/lab2/lab2.srcs/sim_1/new/img_conv_tb.vhd b/LAB2/vivado/lab2/lab2.srcs/sim_1/new/img_conv_tb.vhd
new file mode 100644
index 0000000..58af0cf
--- /dev/null
+++ b/LAB2/vivado/lab2/lab2.srcs/sim_1/new/img_conv_tb.vhd
@@ -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;
diff --git a/LAB2/vivado/lab2/lab2.xpr b/LAB2/vivado/lab2/lab2.xpr
index b8bb925..17e57a7 100644
--- a/LAB2/vivado/lab2/lab2.xpr
+++ b/LAB2/vivado/lab2/lab2.xpr
@@ -77,13 +77,7 @@
-
-
-
-
-
-
-
+
@@ -107,7 +101,13 @@
-
+
+
+
+
+
+
+
@@ -157,13 +157,16 @@
+
+
+
+
+
+
-
+
-
-
-
diff --git a/LAB2/vivado/pak_depak/pak_depak.xpr b/LAB2/vivado/loopback/loopback.xpr
similarity index 71%
rename from LAB2/vivado/pak_depak/pak_depak.xpr
rename to LAB2/vivado/loopback/loopback.xpr
index 8195bd1..8cef439 100644
--- a/LAB2/vivado/pak_depak/pak_depak.xpr
+++ b/LAB2/vivado/loopback/loopback.xpr
@@ -3,7 +3,7 @@
-
+
@@ -55,13 +55,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -89,29 +89,29 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
@@ -119,7 +119,7 @@
-
+
@@ -133,7 +133,7 @@
-
+
@@ -152,33 +152,33 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -202,7 +202,7 @@
-
+
@@ -212,7 +212,7 @@
-
+
Vivado Synthesis Defaults
@@ -224,7 +224,7 @@
-
+
Vivado Synthesis Defaults
@@ -236,7 +236,7 @@
-
+
Vivado Synthesis Defaults
@@ -248,7 +248,7 @@
-
+
Vivado Synthesis Defaults
@@ -260,7 +260,7 @@
-
+
Vivado Synthesis Defaults
@@ -272,7 +272,7 @@
-
+
@@ -290,7 +290,7 @@
-
+
Default settings for Implementation.
@@ -309,7 +309,7 @@
-
+
Default settings for Implementation.
@@ -328,7 +328,7 @@
-
+
Default settings for Implementation.
@@ -347,7 +347,7 @@
-
+
Default settings for Implementation.
@@ -366,7 +366,7 @@
-
+
Default settings for Implementation.