Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] How can I create calculable Time values in simulation VHDL codes?

Status
Not open for further replies.

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 ';'
 

constant cT3p5Delay : time := time( cDelay_ns );
 

constant cT3p5Delay : time := time( cDelay_ns );

Oh, That was very nice,... So thanks..
But where is the documents for learning something like this?

- - - Updated - - -

Oh, I tried this new code but not worked..

Code:
	constant gRs232Rate : real :=115.6;--Kbps
	constant iClk_period : time := 10 ns;
	constant cDelay_ns : integer :=integer(10.0 * 3.5 / gRs232Rate * 1.0e6 );
	constant cT3p5Delay : time := time( cDelay_ns );

Code:
# ** Error: Agc_Tb.vhd(92): Illegal type conversion from std.STANDARD.INTEGER to std.STANDARD.TIME (numeric to non-numeric).
 

Any Idea????
Some one help please..
 

try constant cT3p5Delay : time := cDelay_ns * 1 ns;
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top