W
walala
Guest
Dear all,
I have posted several questions here recently and got a lot very
helpful answers... they are really helpful and I really appreciate
that... thank you all...
However I am still stuck with the same probelm... , which is now my
most headache... I don't know why: pre-synthesis simulation and
post-synthesis simulation show it is correct; but after layout and
netlist extraction, the post-layout simulation show it is wrong... I
really don't know why and I am swamped!
The code is here: in my pre-layout simulation, I give input test
bench:
--x <= (-8, 3, -2, -4, 3, -1);
x <= (B"11111111000", B"00000000011", B"11111111110",
B"11111111100", B"00000000011", B"11111111111"); -- 11 bits input...
The the correct t1=-256, t2=132, t6=-88, t10=-168, t12=186,
t22=-42...
In my post-layout simulation, I use nanosim to supply the same test
vector, the results came to be:
t1=-1x(no waveform for the lower four bits of t1), t2=xxxxx,
t6=xxxxx, t10=-42, t12=93, t22=-168,...
It is really strange that t10, t12, t22 have some relationship with
the expected values...But I really don't know why such a simple
circuit does not work...
I suspected that the Synopsys DC does not synthesize the code
correctly... For example, I am assuming that all my arithmetic
operations are signed, maybe Synopsys does not think all the
operations are signed?
Can anybody give me a hand out of this swamp?
Thank you very much,
-Wallala
-------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_arith.ALL;
USE ieee.std_logic_signed.ALL;
PACKAGE MYTYPES IS
SUBTYPE INPUT_WORD IS STD_LOGIC_VECTOR(10 downto 0); -- -1024
TO 1023;
SUBTYPE OUTPUT_BYTE IS STD_LOGIC_VECTOR(7 downto 0); -- -128
TO 127;
SUBTYPE INTERNAL_WORD IS STD_LOGIC_VECTOR(18 downto 0); --
-65536 TO 65535;
TYPE INPUT_WORD_ARRAY IS ARRAY(0 TO 5) OF INPUT_WORD;
TYPE OUTPUT_BYTE_ARRAY IS ARRAY(0 TO 0) OF OUTPUT_BYTE;
TYPE INTERNAL_WORD_ARRAY IS ARRAY(0 TO 0) OF INTERNAL_WORD;
END PACKAGE MYTYPES;
USE work.mytypes.all;
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_arith.ALL;
USE ieee.std_logic_signed.ALL;
ENTITY mytry IS
PORT(clk : IN std_logic;
rst : IN std_logic;
x : IN INPUT_WORD_ARRAY;
y : OUT OUTPUT_BYTE_ARRAY;
yout : OUT INTERNAL_WORD;
tt1 : OUT INTERNAL_WORD;
tt2 : OUT INTERNAL_WORD;
tt6 : OUT INTERNAL_WORD;
tt10 : OUT INTERNAL_WORD;
tt12 : OUT INTERNAL_WORD;
tt22 : OUT INTERNAL_WORD
);
END mytry;
ARCHITECTURE flex OF mytry IS
SIGNAL t1, t2, t6, t10, t12, t22: INTERNAL_WORD;
SIGNAL temp1, temp2: INTERNAL_WORD;
SIGNAL temp: INTERNAL_WORD_ARRAY;
BEGIN
t1<=B"00100000"*x(0); --32
t2<=B"00101100"*x(1); --44
t6<=B"00101100"*x(2); --44
t10<=B"00101010"*x(3); --42
t12<=B"00111110"*x(4); --62
t22<=B"00101010"*x(5); --42
tt1<=t1;
tt2<=t2;
tt6<=t6;
tt10<=t10;
tt12<=t12;
tt22<=t22;
temp1<=t1+t6+t22;
temp2<=t2+t12;
temp(0)<= temp1+temp2+t10;
yout <= temp(0);
p2: PROCESS(temp)
BEGIN
if temp(0)(7)='1' then
Y(0) <= temp(0)(15 downto 8) + '1';
else
Y(0) <= temp(0)(15 downto 8);
end if;
END PROCESS p2;
END flex;
-------------------------------------------------------
Synopsys DC LOG FILE(Selected. I have ignored them... but I do think I
should have not ignored them... was I right?):
-------------------------------------------------------
Warning: There is a data discrepancy between the db and the output
file. This might cause a problem for back-annotation. Please run
change_names -rule vhdl before writing out the file. (VHDL-286)
....
Warning: Verilog 'assign' or 'tran' statements are written out. (VO-4)
....
Warning: In design 'myidct', a pin on submodule 'mul_48/mult/mult' is
connected to logic 1 or logic 0. (LINT-32)
Pin 'B[6]' is connected to logic 0.
Pin 'B[5]' is connected to logic 1.
Pin 'B[4]' is connected to logic 0.
....
Warning: In design 'myidct_DW02_mult_11_7_4', port 'B[6]' is not
connected to any nets. (LINT-28)
....
I have posted several questions here recently and got a lot very
helpful answers... they are really helpful and I really appreciate
that... thank you all...
However I am still stuck with the same probelm... , which is now my
most headache... I don't know why: pre-synthesis simulation and
post-synthesis simulation show it is correct; but after layout and
netlist extraction, the post-layout simulation show it is wrong... I
really don't know why and I am swamped!
The code is here: in my pre-layout simulation, I give input test
bench:
--x <= (-8, 3, -2, -4, 3, -1);
x <= (B"11111111000", B"00000000011", B"11111111110",
B"11111111100", B"00000000011", B"11111111111"); -- 11 bits input...
The the correct t1=-256, t2=132, t6=-88, t10=-168, t12=186,
t22=-42...
In my post-layout simulation, I use nanosim to supply the same test
vector, the results came to be:
t1=-1x(no waveform for the lower four bits of t1), t2=xxxxx,
t6=xxxxx, t10=-42, t12=93, t22=-168,...
It is really strange that t10, t12, t22 have some relationship with
the expected values...But I really don't know why such a simple
circuit does not work...
I suspected that the Synopsys DC does not synthesize the code
correctly... For example, I am assuming that all my arithmetic
operations are signed, maybe Synopsys does not think all the
operations are signed?
Can anybody give me a hand out of this swamp?
Thank you very much,
-Wallala
-------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_arith.ALL;
USE ieee.std_logic_signed.ALL;
PACKAGE MYTYPES IS
SUBTYPE INPUT_WORD IS STD_LOGIC_VECTOR(10 downto 0); -- -1024
TO 1023;
SUBTYPE OUTPUT_BYTE IS STD_LOGIC_VECTOR(7 downto 0); -- -128
TO 127;
SUBTYPE INTERNAL_WORD IS STD_LOGIC_VECTOR(18 downto 0); --
-65536 TO 65535;
TYPE INPUT_WORD_ARRAY IS ARRAY(0 TO 5) OF INPUT_WORD;
TYPE OUTPUT_BYTE_ARRAY IS ARRAY(0 TO 0) OF OUTPUT_BYTE;
TYPE INTERNAL_WORD_ARRAY IS ARRAY(0 TO 0) OF INTERNAL_WORD;
END PACKAGE MYTYPES;
USE work.mytypes.all;
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_arith.ALL;
USE ieee.std_logic_signed.ALL;
ENTITY mytry IS
PORT(clk : IN std_logic;
rst : IN std_logic;
x : IN INPUT_WORD_ARRAY;
y : OUT OUTPUT_BYTE_ARRAY;
yout : OUT INTERNAL_WORD;
tt1 : OUT INTERNAL_WORD;
tt2 : OUT INTERNAL_WORD;
tt6 : OUT INTERNAL_WORD;
tt10 : OUT INTERNAL_WORD;
tt12 : OUT INTERNAL_WORD;
tt22 : OUT INTERNAL_WORD
);
END mytry;
ARCHITECTURE flex OF mytry IS
SIGNAL t1, t2, t6, t10, t12, t22: INTERNAL_WORD;
SIGNAL temp1, temp2: INTERNAL_WORD;
SIGNAL temp: INTERNAL_WORD_ARRAY;
BEGIN
t1<=B"00100000"*x(0); --32
t2<=B"00101100"*x(1); --44
t6<=B"00101100"*x(2); --44
t10<=B"00101010"*x(3); --42
t12<=B"00111110"*x(4); --62
t22<=B"00101010"*x(5); --42
tt1<=t1;
tt2<=t2;
tt6<=t6;
tt10<=t10;
tt12<=t12;
tt22<=t22;
temp1<=t1+t6+t22;
temp2<=t2+t12;
temp(0)<= temp1+temp2+t10;
yout <= temp(0);
p2: PROCESS(temp)
BEGIN
if temp(0)(7)='1' then
Y(0) <= temp(0)(15 downto 8) + '1';
else
Y(0) <= temp(0)(15 downto 8);
end if;
END PROCESS p2;
END flex;
-------------------------------------------------------
Synopsys DC LOG FILE(Selected. I have ignored them... but I do think I
should have not ignored them... was I right?):
-------------------------------------------------------
Warning: There is a data discrepancy between the db and the output
file. This might cause a problem for back-annotation. Please run
change_names -rule vhdl before writing out the file. (VHDL-286)
....
Warning: Verilog 'assign' or 'tran' statements are written out. (VO-4)
....
Warning: In design 'myidct', a pin on submodule 'mul_48/mult/mult' is
connected to logic 1 or logic 0. (LINT-32)
Pin 'B[6]' is connected to logic 0.
Pin 'B[5]' is connected to logic 1.
Pin 'B[4]' is connected to logic 0.
....
Warning: In design 'myidct_DW02_mult_11_7_4', port 'B[6]' is not
connected to any nets. (LINT-28)
....