--- Quote Start ---
Hi Ron,
Man, you just want to have your cake an eat it too, eh? :)
--- Quote End ---
Don't we all? :)
I'm not what you call a skinny person...
--- Quote Start ---
How about something like this (apologies for the VHDL);
component generic_system is
generic (
LCD_TYPE : string := "PARALLEL" -- or "SERIAL"
);
port (
-- System reset
rstN : std_logic;
-- System Clock
clk : std_logic;
-- Some sort of control interface here
-- Parallel LCD interface
p_lcd_en : out std_logic;
p_lcd_rs : out std_logic;
p_lcd_rd_wrN : out std_logic;
p_lcd_dq : in std_logic_vector(7 downto 0) := (others => '0');
p_lcd_dq_out : out std_logic_vector(7 downto 0);
p_lcd_dq_oe : out std_logic
-- Serial (SPI) LCD interface
s_lcd_sel : out std_logic;
s_lcd_sck : out std_logic;
s_lcd_mosi : out std_logic;
s_lcd_miso : in std_logic := '0'
);
end component;
This component would internally use the generic to decide which signals were actually driven by an instantiated component. The unused signals would be driven to deasserted levels. For example, lets say I want the parallel interface, then I set the generic appropriately, and inside this component the generic block that gets triggered for the parallel interface wires up the parallel LCD controller to this component's ports
and that same generic block deasserts the serial LCD ports, eg. s_lcd_sel <= '0', etc. The generic block for the serial LCD interface does the opposite.
In the top-level entity for each specific board, you just instantiate an instance of this generic_system component. You leave the unused ports dangling, and the synthesis tool will eliminate them (note how the
inputs on the component definition have been assigned default values. This will stop the synthesis tool complaining when you have nothing connected to those inputs). The pin assignments for the LCD interface go with the synthesis script for the board, eg., in a Tcl script.
In this scheme, there is no need for pin constraints embedded in the VHDL. You do have to have a top-level 'wrapper' that is board specific in which to drop your generic_system component, but that is really very little work.
How's that sound?
Cheers,
Dave
--- Quote End ---
this is what I have right now.
the problem is that either I get a very messy top level entity (because of all the pin declarations)
or I can use multiple "wrapper" files as you suggested, but it kind of bits the purpose of unifying multiple projects into one. any change I will make in the components connectivity, I will have to copy paste it into the others... even when using version control there is a lot of room for errors.
I really liked the option of assigning locations to components pins. and it looked like Qurtus accepts it at first. it built up my expectations.:cry:
Is there anyone who thinks it's doable? I'm using version 8.1 at the moment, but I'm about to upgrade to 11 soon.
--- Quote Start ---
Quartus and Xilinx tools can both be controlled by Tcl scripts. For example, in a 'blink LEDs' design I have generics for the number of LEDs and the blink counter width.
1) Quartus
set_parameter -name LED_WIDTH 4
set_parameter -name COUNT_WIDTH 27
2) Xilinx ISE
project set "Generics, Parameters" {LED_WIDTH=4 | COUNT_WIDTH=27} -process "Synthesis - XST"
Cheers,
Dave
--- Quote End ---
I know that ISE uses tcl as well, and I intend to take advantage of that.
I only mentioned migrating to Xillinx because you wrote about SOPC builder.
have a nice day
Ron