Model Technology Incorporated ModelSim XE User Manual
PDF
문서
광고
광고
TextIO implementation issues Using STD_INPUT and STD_OUTPUT within ModelSim The standard VHDLâ87 TextIO package contains the following file declarations: file file input: TEXT is in "STD_INPUT"; output: TEXT is out "STD_OUTPUT"; The standard VHDLâ93 TextIO package contains these file declarations: file file input: TEXT open read_mode is "STD_INPUT"; output: TEXT open write_mode is "STD_OUTPUT"; STD_INPUT is a file_logical_name that refers to characters that are entered interactively from the keyboard, and STD_OUTPUT refers to text that is displayed on the screen. In ModelSim reading from the STD_INPUT file brings up a dialog box that allows you to enter text into the current buffer. The last line written to the STD_OUTPUT file appears as a prompt in this dialog box. Any text that is written to the STD_OUTPUT file is also echoed in the Transcript window. TextIO implementation issues Writing strings and aggregates A common error in VHDL source code occurs when a call to a WRITE procedure does not specify whether the argument is of type STRING or BIT_VECTOR. For example, the VHDL procedure: WRITE (L, "hello"); will cause the following error: ERROR: Subprogram "WRITE" is ambiguous. In the TextIO package, the WRITE procedure is overloaded for the types STRING and BIT_VECTOR. These lines are reproduced here: procedure WRITE(L: inout LINE; VALUE: in BIT_VECTOR; JUSTIFIED: in SIDE:= RIGHT; FIELD: in WIDTH := 0); procedure WRITE(L: inout LINE; VALUE: in STRING; JUSTIFIED: in SIDE:= RIGHT; FIELD: in WIDTH := 0); The error occurs because the argument "hello" could be interpreted as a string or a bit vector, but the compiler is not allowed to determine the argument type until it knows which function is being called. The following procedure call also generates an error: WRITE (L, "010101"); 4-48 VHDL Simulation ModelSim Xilinx Userâs Manual ">
/
다운로드
친절한 알림입니다. 여기에서 문서를 볼 수 있습니다. 그러나 가장 중요한 것은 AI가 이미 읽었다는 것입니다. 복잡한 내용을 간단하게 설명하고, 모든 언어로 질문에 답변하고, 가장 길거나 복잡한 문서도 빠르게 탐색할 수 있도록 도와줍니다.
광고