began working on ganimede template. Unconstrained types are no longer needed
This commit is contained in:
parent
899877d47f
commit
4d8d24701f
32
src/ganimede.vhd
Normal file
32
src/ganimede.vhd
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
library IEEE;
|
||||||
|
use IEEE.std_logic_1164.all;
|
||||||
|
library work;
|
||||||
|
use work.io_types.all;
|
||||||
|
|
||||||
|
entity ganimede is
|
||||||
|
port (
|
||||||
|
ext_interface_in : in ext_interface_in_t;
|
||||||
|
ext_interface_out : out ext_interface_out_t
|
||||||
|
);
|
||||||
|
end entity ganimede;
|
||||||
|
architecture rtl of ganimede is
|
||||||
|
--- SIGNALS INTERFACING THE IP CORE
|
||||||
|
signal int_interface_in : int_interface_in_t;
|
||||||
|
signal int_interface_out : int_interface_out_t;
|
||||||
|
|
||||||
|
--- COMPONENT DECLERATIONS ---
|
||||||
|
component socbridge_driver is
|
||||||
|
port(
|
||||||
|
ext_in : in ext_socbridge_in_t;
|
||||||
|
ext_out : out ext_socbridge_out_t;
|
||||||
|
int_in : in int_socbridge_in_t;
|
||||||
|
int_out : out int_socbridge_out_t
|
||||||
|
);
|
||||||
|
end component;
|
||||||
|
|
||||||
|
begin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end architecture rtl;
|
||||||
@ -5,15 +5,6 @@ use IEEE.MATH_REAL.all;
|
|||||||
package io_types is
|
package io_types is
|
||||||
|
|
||||||
--- STANDARD TYPES ---
|
--- STANDARD TYPES ---
|
||||||
type ext_protocol_impl_t is record
|
|
||||||
payload, control: STD_LOGIC_VECTOR;
|
|
||||||
end record ext_protocol_impl_t;
|
|
||||||
|
|
||||||
type int_protocol_impl_t is record
|
|
||||||
payload : STD_LOGIC_VECTOR;
|
|
||||||
-- ADD MORE STUFF WHEN WE HAVE DECIDED UPON DRIVER INTERFACE
|
|
||||||
end record int_protocol_impl_t;
|
|
||||||
|
|
||||||
type ext_protocol_def_t is record
|
type ext_protocol_def_t is record
|
||||||
name: string (1 to 20);
|
name: string (1 to 20);
|
||||||
payload_width: natural;
|
payload_width: natural;
|
||||||
@ -22,46 +13,46 @@ package io_types is
|
|||||||
|
|
||||||
type interface_inst_t is record
|
type interface_inst_t is record
|
||||||
socbridge: ext_protocol_def_t;
|
socbridge: ext_protocol_def_t;
|
||||||
spi: ext_protocol_def_t;
|
|
||||||
end record interface_inst_t;
|
end record interface_inst_t;
|
||||||
|
|
||||||
--- PROTOCOL INFORMATION ---
|
--- PROTOCOL INFORMATION ---
|
||||||
constant interface_inst : interface_inst_t := (
|
constant interface_inst : interface_inst_t := (
|
||||||
("SoCBridge ", 8, 2, 2),
|
socbridge => ("SoCBridge ", 8, 2, 2)
|
||||||
("SPI ", 1, 3, 3)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
--- AUTOGENERATED TYPES ---
|
--- AUTOGENERATED TYPES ---
|
||||||
|
type ext_socbridge_in_t is record
|
||||||
|
payload : STD_LOGIC_VECTOR(interface_inst.socbridge.payload_width - 1 downto 0);
|
||||||
|
control : STD_LOGIC_VECTOR(interface_inst.socbridge.control_width_in - 1 downto 0);
|
||||||
|
end record ext_socbridge_in_t;
|
||||||
|
|
||||||
|
type ext_socbridge_out_t is record
|
||||||
|
payload : STD_LOGIC_VECTOR(interface_inst.socbridge.payload_width - 1 downto 0);
|
||||||
|
control : STD_LOGIC_VECTOR(interface_inst.socbridge.control_width_in - 1 downto 0);
|
||||||
|
end record ext_socbridge_out_t;
|
||||||
|
|
||||||
|
type int_socbridge_in_t is record
|
||||||
|
payload : STD_LOGIC_VECTOR(interface_inst.socbridge.payload_width - 1 downto 0);
|
||||||
|
end record int_socbridge_in_t;
|
||||||
|
|
||||||
|
type int_socbridge_out_t is record
|
||||||
|
payload : STD_LOGIC_VECTOR(interface_inst.socbridge.payload_width - 1 downto 0);
|
||||||
|
end record int_socbridge_out_t;
|
||||||
|
|
||||||
type ext_interface_in_t is record
|
type ext_interface_in_t is record
|
||||||
socbridge : ext_protocol_impl_t(
|
socbridge : ext_socbridge_in_t;
|
||||||
payload(interface_inst.socbridge.payload_width - 1 downto 0),
|
|
||||||
control(interface_inst.socbridge.control_width_in - 1 downto 0));
|
|
||||||
spi : ext_protocol_impl_t(
|
|
||||||
payload(interface_inst.spi.payload_width - 1 downto 0),
|
|
||||||
control(interface_inst.spi.control_width_in - 1 downto 0));
|
|
||||||
end record ext_interface_in_t;
|
end record ext_interface_in_t;
|
||||||
|
|
||||||
type ext_interface_out_t is record
|
type ext_interface_out_t is record
|
||||||
socbridge : ext_protocol_impl_t(
|
socbridge : ext_socbridge_out_t;
|
||||||
payload(interface_inst.socbridge.payload_width - 1 downto 0),
|
|
||||||
control(interface_inst.socbridge.control_width_out - 1 downto 0));
|
|
||||||
spi : ext_protocol_impl_t(
|
|
||||||
payload(interface_inst.spi.payload_width - 1 downto 0),
|
|
||||||
control(interface_inst.spi.control_width_out - 1 downto 0));
|
|
||||||
end record ext_interface_out_t;
|
end record ext_interface_out_t;
|
||||||
|
|
||||||
type int_interface_in_t is record
|
type int_interface_in_t is record
|
||||||
socbridge : int_protocol_impl_t(
|
socbridge : int_socbridge_in_t;
|
||||||
payload(interface_inst.socbridge.payload_width - 1 downto 0));
|
|
||||||
spi : int_protocol_impl_t(
|
|
||||||
payload(interface_inst.spi.payload_width - 1 downto 0));
|
|
||||||
end record int_interface_in_t;
|
end record int_interface_in_t;
|
||||||
|
|
||||||
type int_interface_out_t is record
|
type int_interface_out_t is record
|
||||||
socbridge : int_protocol_impl_t(
|
socbridge : int_socbridge_out_t;
|
||||||
payload(interface_inst.socbridge.payload_width - 1 downto 0));
|
|
||||||
spi : int_protocol_impl_t(
|
|
||||||
payload(interface_inst.spi.payload_width - 1 downto 0));
|
|
||||||
end record int_interface_out_t;
|
end record int_interface_out_t;
|
||||||
|
|
||||||
end package io_types;
|
end package io_types;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user