J
james.knoll
I have a number of discrete output modules. Each output signal drives the gate of a FET that can switch the output high or low. The modules are all very similar. Some have outputs to drive two FETs in series, some only drive the output high, and some only drive the output low. Some example entities are shown below.
Is there a way to parameterize the entity so I don't have to have a different module for each slightly different output? I was trying to think of a way to use generics that indicate if the output should be generated or something like that. When I use an entity that has all of the signals, but portmap the unused outputs as open, I get a number of synthesis warnings.
entity discrete_output_drive_high_drive_low
port (
clk : in std_logic;
reset : in std_logic;
command : command_type;
protected_output_drive_high : out std_logic;
protected_output_drive_low : out std_logic
);
entity discrete_output_drive_high
port (
clk : in std_logic;
reset : in std_logic;
command : command_type;
protected_output_drive_high : out std_logic
);
entity discrete_output_dual_drive_high
port (
clk : in std_logic;
reset : in std_logic;
command : command_type;
protected_output_drive_high_a : out std_logic;
protected_output_drive_high_b : out std_logic
);
Thanks for any help you could give me.
Jim
Is there a way to parameterize the entity so I don't have to have a different module for each slightly different output? I was trying to think of a way to use generics that indicate if the output should be generated or something like that. When I use an entity that has all of the signals, but portmap the unused outputs as open, I get a number of synthesis warnings.
entity discrete_output_drive_high_drive_low
port (
clk : in std_logic;
reset : in std_logic;
command : command_type;
protected_output_drive_high : out std_logic;
protected_output_drive_low : out std_logic
);
entity discrete_output_drive_high
port (
clk : in std_logic;
reset : in std_logic;
command : command_type;
protected_output_drive_high : out std_logic
);
entity discrete_output_dual_drive_high
port (
clk : in std_logic;
reset : in std_logic;
command : command_type;
protected_output_drive_high_a : out std_logic;
protected_output_drive_high_b : out std_logic
);
Thanks for any help you could give me.
Jim