ESim/C4/Makerchip-IDE/English

From Script | Spoken-Tutorial
Revision as of 15:35, 11 January 2023 by Nancyvarkey (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Visual cue Narration
Show Slide: Title slide Welcome to the Spoken Tutorial on Makerchip IDE.
Show Slide: Learning objectives In this tutorial, we will learn to
  • Edit and run simulations in the Makerchip IDE
Show Slide: System requirements To record this tutorial, I am using
  • Ubuntu OS v20.04
  • eSim v2.2

The process demonstrated in this tutorial is similar in Windows OS also.

Show Slide:

Pre-requisites

https://spoken-tutorial.org

To follow this tutorial, the learner must have:
  • Basic knowledge of eSim
  • Familiarity with Verilog
  • Basic knowledge of Makerchip-NgVeri feature

For pre-requisite eSim tutorials, please visit this website.

Show Slide: Code Files
  • The files used in this tutorial are provided in the Code files link.
  • Please download and extract the files.
  • Make a copy and then use them while practicing.
Only Narration Now, let us learn about Makerchip IDE and how to run the same from eSim.
Show eSim window with counter4bit.v I have already opened the counter4bit.v file under the Makerchip tab.

We will simulate a 4 bit counter in Makerchip IDE.

Only Narration Let us open the Makerchip IDE.
Click on the Accept Makerchip TOS option

Point to the link

First we need to accept the Terms of Services given by Makerchip.

To do so, click on the Accept Makerchip TOS option under the Makerchip tab.

This option appears only for the very first time.

A dialog box with a link to review the Terms of services appears.

Click on Yes Click onYes to accept the Terms of Services.
Only narration After accepting, this option won't appear in the future when the user restarts eSim.
Click on the Edit in Makerchip option

Point to the dialog box

To open the Makerchip IDE, click on the Edit in Makerchip option.

A dialog box appears on the screen to automate the top module.

Point towards Yes If we choose Yes, a .tlv code with contents same as .v code will be created.

Also, a top module will be added to the .tlv code.

And the new .tlv code will be opened in Makerchip IDE.

Point towards No If we choose No, the current raw Verilog file will be opened in the Makerchip IDE.
Click on Yes Let us click on Yes.

The Makerchip IDE gets started in a new browser window.

Note that to edit in the Makerchip IDE, an active internet connection is required.

Makerchip IDE: We can see the counter4bit.tlv file is opened in the Makerchip IDE.
Note that the Makerchip IDE window has two panels.
Point towards the left panel On the left panel, we can see three tabs.
Click on the EDITOR tab The first is the EDITOR tab and it is used to edit the code.

The counter4bit.v file is loaded under the EDITOR tab.

Click on the NAV-TLV tab Next, the NAV-TLV tab is used to show the Navigable source code.
Click on the LOG tab The third LOG tab shows the errors in the code.

Makerchip IDE: Click on the DIAGRAM tab

Now, let us look at the right side panel.

We see three tabs are present.

The first DIAGRAM tab shows the block diagram of the TL-Verilog code.

Click on the VIZ tab The next is the VIZ tab. It is used for Visualization and Debug.
Click on the WAVEFORM tab The third WAVEFORM tab is used to view the simulated waveforms.
Point to the cross mark in the WAVEFORM tab


Observe the cross mark near the WAVEFORM tab.

It indicates that the waveform has not been generated.

This denotes that the code may have some errors present in it.

Navigate to the LOG tab So, let us rectify the errors.

Navigate to the LOG tab in the top left panel.

Highlight all the error messages according to narration All the error messages are listed at the bottom of the LOG tab in black color.

We see that there is a list oflint_off errors.

These errors are due to the lint_off commands which are already added in code.

The lint_off commands are added as comments in the code.

Highlight the first error message The first error is a lint_off error due to the keyword LATCH.
Navigate to the EDITOR tab Navigate to the EDITOR tab in the top left panel.

Press Ctrl+F and type LATCH

For demonstration purposes, let us search the LATCH keyword in the EDITOR window.

Press Ctrl+F keys together and type LATCH.

Navigate to the command verilator lint_off LATCH Navigate to the command verilator lint_off LATCH.
Delete verilator lint_off LATCH Since this command is throwing an error, let us delete it.
Only Narration Likewise, I will remove all the lint_off errors.

Please pause the tutorial and do the same in your code file.

Click on E

Click on Compile/Sim

Now I have removed all the lint_off errors.

Next, click on the dropdown E in the right corner of the left panel.

Then click on Compile/Sim.

Click on the WAVEFORM tab Let us check the WAVEFORM tab.

The waveform is still not visible.

Switch to the LOG tab

Point to the register error

Switch to the LOG tab to see if all the errors have been removed.

We see a register error apart from lint_off error in the LOG tab.

Click on the EDITOR tab

Search for reg

Click on the EDITOR tab.

Search for the reg keyword in the EDITOR window.

Delete reg Let us delete the reg keyword to avoid errors during compilation.
Only narration Likewise remove all the errors as demonstrated.
Show slide: More about lint-off commands To know more aboutlint_off errors please visit this website:https://verilator.org/guide/latest/warnings.html#list-of-warnings
Click on Compile Now, click on Compile.
Point to the tick mark After compilation, observe the tick mark near the WAVEFORM tab.

It indicates that the code is now error-free.

Click on +sv and+counter4bit Next click on +sv and +counter4bit tab on the left to view the waveform.
Click on the ZOOM IN option Click on the ZOOM IN option at the top for a closer view of the waveform.

I will keep zooming in until the waveform is clearly visible.

Only Narration The counter output is not yet displayed.

Let us edit the code to display the counter output.

Highlight random()

Replace $random() with reset

In the Editor window, we see the top module has random() signals by default.

So, let us replace random() with reset so that the counter gets the clock input.

Click on Compile

Switch to WAVEFORM tab and ZOOM IN

Let us compile again.

Switch to the WAVEFORM tab and ZOOM IN until the waveform is clearly visible.

Point to the out in the waveform. We see the counter is counting up.
Highlighting the \TLV section Let us see how to add a new signal in the TLV section.
Type *newsignal = 1'b0; In the \TLV code section, type the code as shown.
Click on Compile

Switch to WAVEFORM tab

Let us compile again.

Switch to the WAVEFORM tab.

Click on +sv Click on +sv.
Highlighting the newsignal We see the newsignal has been added in the waveform.

In this way, the TLV code can be added.

Only narration This brings us to the end of this tutorial.

Let us summarize.

Show Slide:Summary In this tutorial, we learnt to
  • Edit and run simulations in the Makerchip IDE
Show Slide:' Assignment As an assignment, please do the following:
  • Download and open the file shift.v in Makerchip Tab.
  • shift.v file is available in Code files link
  • Click on Edit in Makerchip option.
  • Remove the errors appearing in the LOG tab.
  • Compile and view the waveforms in the WAVEFORM tab.
  • Add the required signals.
  • Recompile and verify the waveforms.
Show Slide: About Spoken Tutorial Project The video at the following link summarizes the Spoken Tutorial project.

Please download and watch it.

Show Slide: Spoken tutorial workshops The Spoken Tutorial Project team conducts workshops and gives certificates.

For more details, please write to us.

Show Slide:Answers for THIS Spoken Tutorial Please post your timed queries in this forum.
Show Slide: FOSSEE Forum For any general or technical questions on eSim, visit the FOSSEE forum and post your question.
Show Slide: Circuit Simulation Project The FOSSEE team coordinates theCircuit Simulation Project.

For more details, please visit this site.

Show Slide: Textbook Companion Project The FOSSEE team coordinates the TextBook Companion Project.

For more details, please visit this site.

Show Slide: Lab Migration The FOSSEE team coordinates the Lab Migration Project.

For more details, please visit this site.

Show Slide:

Acknowledgement

The Spoken Tutorialproject is funded by the Ministry of Education, Government of India.
Show Slide: Thank you


This is Josiga, a FOSSEE summer fellow 2022, IIT Bombay signing off.

Thanks for joining.

Contributors and Content Editors

Nancyvarkey, Nirmala Venkat