Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17257 Discussions

Entering ASCII test values in ModelSim

Altera_Forum
Honored Contributor II
1,535 Views

Hello everyone, 

 

I am new to the ModelSim software and had a question regarding ASCII test values. At the moment, I am comfortable with the "Create Wave" function where I can establish a clock, a constant, etc. with one of my signals. However, I have no clue how to assign an ASCII value to one of my inputs and have it displayed in the Wave window. My project is a state machine that logs ASCII inputs and will generate a '1' output when 'm', 'p', and '3' are entered sequentially. Thank you in advance for your help! 

 

- dylpillz
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
650 Views

VHDL Character-to-integer conversion: 

 

variable c : character; variable i : integer; i := character'pos(c);  

 

VHDL Integer-to-character conversion: 

 

c := character'val(i);  

 

Cheers, 

Dave
0 Kudos
Reply