Hello All,
I am writing a VHDL design for a Xilinx FPGA using ISE ver 8.2.02i (8.2 SP 2) and I'm trying to get post-map simulating correctly now that I have post-translate simulating correctly. I put "keep" attributes on every single signal, including those in the ports (editor keystroke macros help a lot). I also ran the following command line in a command (DOS) window: (just run the following three lines together with spaces at the line breaks; it is a copy from the DOS window): Note the added -u to try to prevent logic removal, which is why I had to run this in the command window; it's not available as a setting in map properties.
map.exe -ise ppcaesh.ise -intstyle ise -p xc4vfx12-ff668-10 -cm speed
-detail
-pr b -k 4 -c 100 -u -o user_logic_map.ncd user_logic.ngd user_logic.pcf
I have the map optimization now set for speed in my project, reflected in this command. I tried setting "no optimization" as well as all the other optimization choices. The above command made the post map files for me. Now, at least all the red is gone from Post-Map simulation and some of the bytes are right in my first section of output. I think this is due to all the "keep" attributes I added. My removed "redundant logic" list was made a little smaller. Here is the syntax for "keep":
signal mysignal : std_logic; -- declare a signal
attribute keep : string; -- you just need this once -- then you can do the next line for each signal you want. attribute keep of mysignal : signal is "true"; -- this goes in the architecture section after the signal declarations and -- before the "begin".
(Thanks to the thread "Looking for ways to keep diagnostic signal from being optimized out (Xilinx)" here in comp.arch.fpga)
This syntax is found in the Constraints Guide, cgd.pdf.
Here is a partial list of the removed logic: Section 5 - Removed Logic
------------------------- Optimized Block(s): TYPE BLOCK GND XST_GND VCC XST_VCC
Redundant Block(s): TYPE BLOCK LOCALBUF u0/my_sub_mod_128_0_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_10_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_12_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_11_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_13_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_14_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_15_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_16_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_17_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_18_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_19_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_1_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_20_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_21_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_22_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_23_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_24_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_25_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_26_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_27_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_28_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_29_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_2_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_30_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_31_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_3_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_4_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_5_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_6_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_7_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_8_xo1/LUT3_D_BUF LOCALBUF u0/my_sub_mod_128_9_xo1/LUT3_D_BUF LUT1 myrst_inv1 LUT1 dcnt_Msub__sub0000_xor11 INV Bus2IP_Clk_inv_INV_0 LOCALBUF Mxor__xor0019_Result1/LUT3_L_BUF LOCALBUF Mxor__xor0055_Result1/LUT3_L_BUF LOCALBUF Mxor__xor0127_Result1/LUT3_L_BUF LOCALBUF Mxor__xor0083_Result1/LUT3_L_BUF LOCALBUF user_logic_010_xo1/LUT4_L_BUF LOCALBUF user_logic_012_xo1/LUT4_L_BUF LOCALBUF user_logic_014_xo1/LUT4_L_BUF LOCALBUF user_logic_018_xo1/LUT4_L_BUF LOCALBUF user_logic_019_xo1/LUT4_L_BUF LOCALBUF user_logic_01_xo1/LUT4_L_BUF LOCALBUF user_logic_020_xo1/LUT4_L_BUF LOCALBUF user_logic_022_xo1/LUT4_L_BUF LOCALBUF user_logic_023_xo1/LUT4_L_BUF LOCALBUF user_logic_024_xo1/LUT4_L_BUF LOCALBUF user_logic_028_xo1/LUT4_L_BUF LOCALBUF user_logic_02_xo1/LUT4_L_BUF LOCALBUF user_logic_032_xo1/LUT4_L_BUF LOCALBUF user_logic_033_xo1/LUT4_L_BUF LOCALBUF user_logic_035_xo1/LUT4_L_BUF LOCALBUF user_logic_036_xo1/LUT4_L_BUF LOCALBUF user_logic_039_xo1/LUT4_L_BUF LOCALBUF user_logic_03_xo1/LUT4_L_BUF LOCALBUF user_logic_040_xo1/LUT4_L_BUF LOCALBUF user_logic_043_xo1/LUT4_L_BUF LOCALBUF user_logic_044_xo1/LUT4_L_BUF LOCALBUF user_logic_045_xo1/LUT4_L_BUF LOCALBUF user_logic_046_xo1/LUT4_L_BUF etc... (93 more lines)
As you can see from this list from the file user_logic_map.mrp in the project directory, there is still logic being removed. The optimized blocks are still removed if you set "no optimization" and the "redundant" blocks are still being removed even with -u "Do Not Remove Unused Logic" command. Could we have a "Do Not remove Any Logic" option?
-and have the "no optimization" setting respected fully (when set)?
The key, I have learned, is to use the correct Xilinx VHDL style, which is different for FPGAs and ASICs. Once you follow that, you won't have any more problems. Can someone advise me on this correct syntax from this list of "optimized" and "redundant" logic? Meanwhile I am reading the xst.pdf manual, section on VHDL style to try some things. The style to avoid latches I already used, which really worked. Also the style to clock ROMs so that they won't be optimized away as asynchronous RAMs I already used, which did the trick in post- translate.
Best regards,
-James