Started working on io for control unit
This commit is contained in:
parent
c522997e79
commit
8b0ec9a856
34
src/control_unit.vhd
Normal file
34
src/control_unit.vhd
Normal file
@ -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;
|
||||||
@ -15,6 +15,15 @@ package io_types is
|
|||||||
socbridge: ext_protocol_def_t;
|
socbridge: ext_protocol_def_t;
|
||||||
end record interface_inst_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 ---
|
--- PROTOCOL INFORMATION ---
|
||||||
constant interface_inst : interface_inst_t := (
|
constant interface_inst : interface_inst_t := (
|
||||||
socbridge => ("SoCBridge ", 8, 2, 2)
|
socbridge => ("SoCBridge ", 8, 2, 2)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user