added initial test of types needed for ganimede IO
This commit is contained in:
parent
594d295ae2
commit
327ce30d16
22
src/io_type_pkg.vhd
Normal file
22
src/io_type_pkg.vhd
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
library IEEE;
|
||||||
|
use IEEE.MATH_REAL.all;
|
||||||
|
|
||||||
|
package io_types is
|
||||||
|
|
||||||
|
type interface_def_t is record
|
||||||
|
name: string (1 to 20);
|
||||||
|
payload_width, control_width: natural;
|
||||||
|
end record interface_def_t;
|
||||||
|
|
||||||
|
type interface_arr_t is array (natural range <>) of interface_def_t;
|
||||||
|
|
||||||
|
constant interface_arr : interface_arr_t := (
|
||||||
|
0 => ("SoCBridge x ", 8, 2),
|
||||||
|
1 => ("SoCBridge x ", 8, 2),
|
||||||
|
2 => ("SoCBridge x ", 8, 2),
|
||||||
|
3 => ("SoCBridge x ", 8, 2),
|
||||||
|
4 => ("SoCBridge x ", 8, 2),
|
||||||
|
5 => ("SoCBridge x ", 8, 2)
|
||||||
|
);
|
||||||
|
|
||||||
|
end package io_types;
|
||||||
25
src/test.vhd
Normal file
25
src/test.vhd
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
library IEEE;
|
||||||
|
library work;
|
||||||
|
use work.io_types.all;
|
||||||
|
|
||||||
|
entity test is
|
||||||
|
port (
|
||||||
|
t : in interface_arr_t(0 to interface_arr'length - 1)
|
||||||
|
);
|
||||||
|
end entity test;
|
||||||
|
|
||||||
|
architecture rtl of test is
|
||||||
|
|
||||||
|
begin
|
||||||
|
|
||||||
|
proc_name: process
|
||||||
|
begin
|
||||||
|
|
||||||
|
for x in 0 to (interface_arr'length - 1) loop
|
||||||
|
report interface_arr(x).name ;
|
||||||
|
end loop;
|
||||||
|
wait;
|
||||||
|
end process proc_name;
|
||||||
|
|
||||||
|
|
||||||
|
end architecture rtl;
|
||||||
Loading…
x
Reference in New Issue
Block a user