Port Map
Advanced Member level 4
- Joined
- Aug 24, 2013
- Messages
- 118
- Helped
- 15
- Reputation
- 30
- Reaction score
- 14
- Trophy points
- 1,298
- Activity points
- 2,089
I'm interested in using a calculable Time value in my simulation codes.
Like code below, I want to calculate parameter cDelay_ns from other defined values.
But this code not works, and brings the error below.
Plz tell me that how can I solve this problem?
code:
(91) constant gRs232Rate : real :=115.6;--Kbps
(92) constant iClk_period : time := 10 ns;
(93) constant cDelay_ns : integer :=integer(10.0 * 3.5 / gRs232Rate * 1.0e6 );
(94) constant cT3p5Delay : time := cDelay_ns ns;
error:
# ** Error: Test_Tb.vhd(94): near "ns": expecting ';'
Like code below, I want to calculate parameter cDelay_ns from other defined values.
But this code not works, and brings the error below.
Plz tell me that how can I solve this problem?
code:
(91) constant gRs232Rate : real :=115.6;--Kbps
(92) constant iClk_period : time := 10 ns;
(93) constant cDelay_ns : integer :=integer(10.0 * 3.5 / gRs232Rate * 1.0e6 );
(94) constant cT3p5Delay : time := cDelay_ns ns;
error:
# ** Error: Test_Tb.vhd(94): near "ns": expecting ';'