What a waste of my time! (A cautionary rant)
As part of a re-engineering of a 15 year old product, I need a ROM with pre-settable output in a Spartan 3. It is company policy to try to write for vendor indepence, so the ROM has to be coded in VHDL, and I cannot use Coregen (even though I know this product will never be targeted to any other part, at least for another 10 years). The 8.1i release of ISE has support for "synchronously controlled initialization of the RAM data outputs" (pg 218 of XST User Guide) and for RAM initialization (pg 226). Thinking I can be clever about it, I code up a RAM with initial values and also with output initialization:
type ram_type is array (0 to 255) of std_logic_vector(7 downto 0); signal RAM : ram_type := ( X"12", X"34", yadda, yadda, yadda,
constant Init_Value : std_logic_vector( 7 downto 0 ) := x"FE"; ... process( Clk ) begin if RISING_EDGE( Clk ) then if CE = '1' then if WE = '1' then RAM (TO_INTEGER(Addr))