From 8b0ec9a856bd168b3070c9d5426fb1a2a0a944b0 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 24 Feb 2025 17:13:00 +0100 Subject: [PATCH] Started working on io for control unit --- src/control_unit.vhd | 34 ++++++++++++++++++++++++++++++++++ src/io_type_pkg.vhd | 9 +++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/control_unit.vhd diff --git a/src/control_unit.vhd b/src/control_unit.vhd new file mode 100644 index 0000000..48273a7 --- /dev/null +++ b/src/control_unit.vhd @@ -0,0 +1,34 @@ +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.MATH_REAL.all; +library work; +use work.io_types.all; + +entity control_unit is + + port ( + clk, rst: in std_logic; + address_read_in, address_write_in: in control_unit_ext_t.address; + address_read_out, address_write_out: in control_unit_ext_t.address); + words_to_read_in: in std_logic_vector(control_unit_ext_t.seq_read_count); + words_to_write_in: in std_logic_vector(control_unit_ext_t.seq_write_count); + ); + +end entity control_unit; + +architecture behave of control_unit is + +begin + + main_proc: process(clk) + begin + if rising_edge(clk) then + if rst = '0' then + + else + + end if; + end if; + end process main_proc; + +end architecture behave; diff --git a/src/io_type_pkg.vhd b/src/io_type_pkg.vhd index 3afb8f0..bfac5b1 100644 --- a/src/io_type_pkg.vhd +++ b/src/io_type_pkg.vhd @@ -15,6 +15,15 @@ package io_types is socbridge: ext_protocol_def_t; end record interface_inst_t; + constant number_of_drivers = 3; + + type control_unit_ext_t is record + interface_id_count: in std_logic_vector(number_of_drivers)) downto 0); + address: in std_logic_vector(32 downto 0); + seq_write_count: in std_logic_vector(7 downto 0); + seq_read_count: in std_logic_vector(7 downto 0); + end record control_unit_format; + --- PROTOCOL INFORMATION --- constant interface_inst : interface_inst_t := ( socbridge => ("SoCBridge ", 8, 2, 2)