Hi,I am new to Quartus II. I have created a very simple program for shift register in VHDL. It was successfully compiled. Then I create the input wave forms and saved it. When I run it, the last statement is "can not open .......filename .vcd file". the program runs fine, except at the end it states: reading f:/altera/worklibrary/shift/shift.vwf...
unable to open f:/altera/worklibrary/shift/simulation/qsim/shift.msim.vcd error.
the vhdl file form the textbook"eda实用教程（vhdl版）" is:
library ieee;--打开ieee库 use ieee.std_logic_1164.all;--允许ieee库中1164程序包中所有内容 entity shift is port( clk: in std_logic;--时钟信号 co: in std_logic;--进位输入信号 md: in std_logic_vector(2 downto 0); d: in std_logic_vector(7 downto 0);--待加载移位的数据 qb: out std_logic_vector(7 downto 0);--led移位输出信号 cn: out std_logic);--led移位进位信号 end entity shift; architecture bhv of shift is signal reg:std_logic_vector(7 downto 0); signal cy:std_logic; begin process(clk,co,md) begin if clk'event and clk='1' then case md is when "000" => reg(0)<=co;reg(7 downto 1)<=reg(6 downto 0);cy<=reg(7);--带进位循环向左移位 when "001" => reg(0)<=reg(7);reg(7 downto 1)<=reg(6 downto 0);--不带进位循环向左移位 when "010" => reg(7)<=co;reg(6 downto 0)<=reg(7 downto 1);cy<=reg(0);--带进位循环向右移位 when "011" => reg(7)<=reg(0);reg(6 downto 0)<=reg(7 downto 1);--不带进位循环向右移位 when "100" => reg(7 downto 0)<=d(7 downto 0);--加载待移位的数 when others => reg<=reg;cy<=cy;--保持不变 end case; end if; end process; qb(7 downto 0)<=reg(7 downto 0);--led移位输出 cn<=cy;--led移位进位输出 end architecture bhv; i think that it is probably the vhdl file syntax error or logic error.signal statements are most likely to make mistakes.
so i really need your help to solve the confused problem.
thank you very much!
It isn't a school project. I only find the the mistakes on the textbook. I have been pondering over it.However, I'm sorry I didn't solve it.So I am hoping to get your help. Well, come on, Is it worth it, or not?
The compiler will tell you any errors.It sounds like it cannot find the file The code you posted has no syntax errors. (unless it doesnt like the chinese characters)
hope qsim directory in file path indicates that you use Universtity Progrma VWF <- is it true?The first error i've met today face to face: after several succesive runs for functional simualtion and when I've chaged synthesis option i 've started encounter error in vt files, no any changes except for synthesis. even i try to recreate vt file. Try simulate in ModelSim-Altera Starter. And it is not easy provide answer when you say "Quartus II" and what simulation tool you've used. What is version number?
I deeply use the Universtity Progrma VWF button to creat the input wave forms and saved it. Even I try to recreate the VMF file.version: Quartus II 64 bit 184.108.40.206 and ModelSim-Altera 10.3d (Quartus II 15.0) Do you have any way to solve the problem. I really desire the answer. Thank you anyway.
The problem has been solved！The real reason is key word error.Error (146032): Syntax error encountered in vector source file F:/altera/WorkLibrary/shift/simulation/qsim/shift.msim.vcd, line 75, found text "reg" If you replace the word 'reg' with other word like 'temp', the waveform simulation can run normally. Thanks any way, an example in the textbook has a single mistake.
brr...really? is testbench for VHDL converted to Verilog? I heard that 'reg' is reserved word for Verilog. I don't trust anything from software guys until deep explorer.
Thank you! You remind me. I checked the simulation output.quartus_eda --gen_testbench --check_outputs=on --tool=modelsim_oem --format=verilog --write_settings_files=off shift -c shift --vector_source="F:/altera/WorkLibrary/shift/shift.vwf" --testbench_file="F:/altera/WorkLibrary/shift/simulation/qsim/shift.vwf.vt" Fact like you said truly.