Skip to content
Snippets Groups Projects
Commit c7821632 authored by David Monk's avatar David Monk
Browse files

Added data rate

parent e812a616
No related branches found
No related tags found
1 merge request!34Add functionality for multiple module types in a single image
Pipeline #5917727 failed
......@@ -204,7 +204,8 @@ begin
LinkInterfaceInstance : entity work.LinkInterface
--==============================--
generic map (
module_type => cDTCInputLinkMap(i).module_type
module_type => cDTCInputLinkMap(i).module_type,
data_rate => cDTCInputLinkMap(i).data_rate
)
port map (
--- Input Ports ---
......
......@@ -10,10 +10,10 @@ package dtc_link_maps is
type tDTCInputLinkMap is array(0 to cNumberOfFEModules - 1) of tDTCInputLinkConfig;
constant cDTCInputLinkMap : tDTCInputLinkMap := (
0 => (8, "2S", "CIC2"),
1 => (9, "2S", "CIC2"),
2 => (10, "2S", "CIC2"),
3 => (11, "2S", "CIC2")
0 => (8, "2S", 5, "CIC2"),
1 => (9, "2S", 5, "CIC2"),
2 => (10, "2S", 5, "CIC2"),
3 => (11, "2S", 5, "CIC2")
);
type tDTCOutputLinkMap is array(0 to cNumberOfOutputLinks - 1) of integer;
......@@ -22,6 +22,7 @@ package dtc_link_maps is
);
function selectModuleTypeFromChannel(channel : in integer) return string;
function selectDataRateFromChannel(channel : in integer) return integer;
end package dtc_link_maps;
package body dtc_link_maps is
......@@ -35,4 +36,15 @@ package body dtc_link_maps is
end loop;
end selectModuleTypeFromChannel;
function selectDataRateFromChannel(channel : in integer) return integer is
variable data_rate : integer;
begin
for i in 0 to cDTCInputLinkMap'length - 1 loop
if cDTCInputLinkMap(i).index = channel then
data_rate := cDTCInputLinkMap(i).data_rate;
end if;
end loop;
return data_rate;
end selectDataRateFromChannel;
end package body dtc_link_maps;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment