![]() ![]() If y has the value 1 within at most two clock cycles, then the FSM should maintain g = 1 permanently (that is, until reset). ![]() While maintaining g = 1 the FSM has to monitor the y input. ![]() When x has produced the values 1, 0, 1 in three successive clock cycles, then g should be set to 1 on the following clock cycle. Then, the FSM has to monitor the x input. When the reset signal is de-asserted, then after the next clock edge the FSM has to set the output f to 1 for one clock cycle. As long as the reset input is asserted, the FSM stays in a beginning state, called state A. There is also a clock input called clk and a reset input called resetn. The FSM has inputs x and y, which come from the motor, and produces outputs f and g, which control the motor. I hate to admit it - but the IDE has me stumped here.Ĭonsider a finite state machine that is used to control some type of motor. I am using modelsim Altera starter edition 10.1.b. ![]() It's only when I include a submodule into another module does an issue appear. Currently both items are in the top level of the design with no subfolders (virtual or otherwise). When I simulate the ngate module by itself - I have no issues - and it works fine. All files are located in the 'root' of the project space - with the only subfolders being those generated by modelsim in a "work" folder. The only other issue is the include syntax perhaps - however I am not sure on this. (And not to mention the code basically isolates this as the only cause as far as I can tell). So I know this has to do with something in how ModelSim does includes in simulation. When I comment out the MUT ngate(A,B) line the issue disappears. The test bench code is: `include "ngate.v" The code is as follows: module ngate(A, B) I've tried adding the project root directory into the (project window) -> left click -> properties -> Verilog & SystemVerilog -> include directory. I know this is basically a problem related to "finding the called module" - however I do not know how to fix it. (please - explain what I'm doing wrong in a way a six years old would understand - and how to fix the issue - and more importantly what it is caused by). I'm new to ModelSim and I have no idea how to fix it and the issue I'm having is that a lot of the explanations are too "technical" at this stage for me to follow as I'm relatively new to this environment. # ** Error: (vsim-3033) C:/Users/user/Desktop/testitems/ngateTB.v(7): Instantiation of 'MUT' failed. The exact error is as follows: vsim -voptargs=+acc work.NGateTB I've seen the question "answered" a couple of times - however the explanation at this stage goes over my head. All code compiles fine (according to modelsims 'check marks'). I'm getting the vsim-3033 error in ModelSim when I try including a sub module into a testbench for simulation. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |