1/1
I2C controller Core Implementation
by bilal2228 on May 22, 2017 |
bilal2228
Posts: 7 Joined: May 17, 2017 Last seen: Feb 26, 2019 |
||
Have anybody simulated the I2C controller project and implemented the examples. I'm trying to do it but i just got sequence not the result as shown in example.
|
RE: I2C controller Core Implementation
by olof on May 23, 2017 |
olof
Posts: 218 Joined: Feb 10, 2010 Last seen: Dec 17, 2018 |
||
i2c has been packaged for FuseSoC. Once you have installed FuseSoC (https://github.com/olofk/fusesoc) you can simply run "fusesoc sim i2c" to run test test suite. By default it runs Icarus verilog, but if you want to try with another simulator run "fusesoc sim --sim=$another_simulator i2c". I've tested it successfully with icarus, modelsim, isim and xsim
Hope this helps |
RE: I2C controller Core Implementation
by bilal2228 on May 24, 2017 |
bilal2228
Posts: 7 Joined: May 17, 2017 Last seen: Feb 26, 2019 |
||
i2c has been packaged for FuseSoC. Once you have installed FuseSoC (https://github.com/olofk/fusesoc) you can simply run "fusesoc sim i2c" to run test test suite. By default it runs Icarus verilog, but if you want to try with another simulator run "fusesoc sim --sim=$another_simulator i2c". I've tested it successfully with icarus, modelsim, isim and xsim
will you elaborate further, how to run in Model Sim. I am able to get sequence, but don't get waveform in modelsim. |
RE: I2C controller Core Implementation
by bilal2228 on May 24, 2017 |
bilal2228
Posts: 7 Joined: May 17, 2017 Last seen: Feb 26, 2019 |
||
And I'm using the project posted by Richard.
|
RE: I2C controller Core Implementation
by dgisselq on May 27, 2017 |
dgisselq
Posts: 247 Joined: Feb 20, 2015 Last seen: Oct 24, 2024 |
||
Would you believe I've written a response to your question several times, only to have it get lost on OpenCores forum confirmation page? Sigh.
Ok, I2C, and how to simulate it. I don't know how Richard simulated his, but I can point you to one that simulates using Verilator. If you have Verilator. installed, then a make in the main project directory should run separate simulations of an I2C master and an I2C slave. The simulation makes .VCD files that you can then plug into GTKwave to see what's going on. I can also point you to a discussion of how I built the core incorrectly at first, and only rescued the project using a wishbone scope. (Oops!) Let me know if that helps, Dan |
RE: I2C controller Core Implementation
by olof on May 31, 2017 |
olof
Posts: 218 Joined: Feb 10, 2010 Last seen: Dec 17, 2018 |
||
Sorry for the late reply. If you want to run it in the modelsim GUI, the easiest way is to let FuseSoC build the project, and then start modelsim yourself. You can do this by first running "fusesoc sim --sim=modelsim --build-only i2c" to build the simulation model. Go to the directory of the generated code "cd build/i2c_1.14/sim-modelsim/" and finally run "vsim -do fusesoc_run.tcl" to load the model in the Modelsim GUI
|
1/1