ganimede-package #7

Merged
kryddan merged 2 commits from ganimede-package into main 2025-02-17 14:25:05 +01:00
2 changed files with 47 additions and 0 deletions
Showing only changes of commit 327ce30d16 - Show all commits

22
src/io_type_pkg.vhd Normal file
View 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
View 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;