Difference between revisions of "ESim/C4/Makerchip-IDE/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with "{| border="1" |- || '''Visual cue''' || '''Narration''' |- || Show Slide:''' Title slide''' || Welcome to the '''Spoken Tutorial''' on '''Makerchip IDE.''' |- ||Show Slide:'...")
 
 
Line 10: Line 10:
  
 
|| In this tutorial, we will learn to
 
|| In this tutorial, we will learn to
* Edit and  
+
* Edit and '''run simulations''' in the''' Makerchip IDE '''
* Run simulations in the''' Makerchip IDE '''
+
 
|-  
 
|-  
 
||Show Slide:''' System requirements'''
 
||Show Slide:''' System requirements'''
  
||To record this tutorial, I am using* '''Ubuntu OS v20.04 '''
+
||To record this tutorial, I am using
 +
* '''Ubuntu OS v20.04 '''
 
* '''eSim v2.2'''
 
* '''eSim v2.2'''
  
Line 40: Line 40:
 
|-  
 
|-  
 
|| Only Narration
 
|| Only Narration
|| Now, let us learn about '''Makerchip IDE''' and how to run the same from '''eSim'''.
+
|| Now, let us learn about '''Makerchip IDE''' and how to '''run''' the same from '''eSim'''.
 
|-  
 
|-  
 
|| Show''' eSim '''window with '''counter4bit.v'''
 
|| Show''' eSim '''window with '''counter4bit.v'''
 
||I have already opened the '''counter4bit.v''' file under the '''Makerchip''' tab.
 
||I have already opened the '''counter4bit.v''' file under the '''Makerchip''' tab.
  
We will simulate a '''4 bit counter''' in '''Makerchip IDE'''.
+
We will '''simulate''' a '''4 bit counter''' in '''Makerchip IDE'''.
 
|-  
 
|-  
 
|| Only Narration
 
|| Only Narration
|| Let us open the'''Makerchip IDE.'''
+
|| Let us open the '''Makerchip IDE.'''
 
|-  
 
|-  
 
||Click on the '''Accept Makerchip TOS '''option
 
||Click on the '''Accept Makerchip TOS '''option
  
 
Point to the link
 
Point to the link
||First we need to accept the'''Terms of Services''' given by'''Makerchip'''.
+
||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.
+
To do so, click on the '''Accept Makerchip TOS''' option under the '''Makerchip '''tab.
  
 
This option appears only for the very first time.
 
This option appears only for the very first time.
  
A dialog box with a link to review the'''Terms of services '''appears.
+
A dialog box with a link to review the '''Terms of services '''appears.
 
|-  
 
|-  
 
|| Click on '''Yes'''
 
|| Click on '''Yes'''
|| Click on'''Yes '''to accept the''' Terms of Services'''.
+
|| Click on'''Yes '''to accept the ''' Terms of Services'''.
 
|-  
 
|-  
 
|| Only narration
 
|| Only narration
|| After accepting, this option won't appear in the future when the user restarts'''eSim.'''
+
|| After accepting, this option won't appear in the future when the user restarts '''eSim.'''
 
|-  
 
|-  
 
||Click on the '''Edit in Makerchip '''option
 
||Click on the '''Edit in Makerchip '''option
Line 72: Line 72:
 
||To open the '''Makerchip IDE''', click on the '''Edit in Makerchip '''option.
 
||To open the '''Makerchip IDE''', click on the '''Edit in Makerchip '''option.
  
A dialog box appears on the screen to automate the top module.
+
A dialog box appears on the screen to automate the top '''module'''.
 
|-  
 
|-  
 
||Point towards '''Yes'''
 
||Point towards '''Yes'''
Line 84: Line 84:
 
|-  
 
|-  
 
|| Point towards '''No'''
 
|| Point towards '''No'''
|| If we choose '''No''', the current raw '''verilog''' file will be opened in the '''Makerchip IDE'''.
+
|| If we choose '''No''', the current raw '''Verilog''' file will be opened in the '''Makerchip IDE'''.
 
|-  
 
|-  
 
||Click on '''Yes'''
 
||Click on '''Yes'''
Line 92: Line 92:
 
The '''Makerchip IDE '''gets started in a new browser window.
 
The '''Makerchip IDE '''gets started in a new browser window.
  
Note that to edit in the '''Makerchip IDE''', an active internet connection is required.
+
Note that to edit in the '''Makerchip IDE''', an active '''internet connection''' is required.
 
|-  
 
|-  
 
||'''Makerchip IDE: '''
 
||'''Makerchip IDE: '''
Point towards the left panel
 
 
||We can see the '''counter4bit.tlv''' file is opened in the''' Makerchip IDE'''.
 
||We can see the '''counter4bit.tlv''' file is opened in the''' Makerchip IDE'''.
 +
|-
 +
||
 +
||Note that the '''Makerchip IDE''' window has two panels.
  
Note that the '''Makerchip IDE''' window has two panels.
+
|-
 
+
||Point towards the left panel
On the''' left panel''', we can see three tabs.
+
||On the''' left panel''', we can see three tabs.
 
|-  
 
|-  
 
||Click on the '''EDITOR '''tab
 
||Click on the '''EDITOR '''tab
Line 109: Line 111:
 
|-  
 
|-  
 
|| Click on the '''NAV-TLV '''tab
 
|| Click on the '''NAV-TLV '''tab
|| Next,''' '''the '''NAV-TLV '''tab is used to show the'''Navigable source code.'''
+
|| Next, the '''NAV-TLV '''tab is used to show the '''Navigable source code.'''
 
|-  
 
|-  
 
|| Click on the '''LOG '''tab
 
|| Click on the '''LOG '''tab
|| The third'''LOG''' tab shows the errors in the code.
+
|| The third '''LOG''' tab shows the errors in the code.
 
|-  
 
|-  
 
||
 
||
Line 120: Line 122:
 
We see three tabs are present.  
 
We see three tabs are present.  
  
The first '''DIAGRAM''' tab''' '''shows the block diagram of the '''TL-Verilog''' code.
+
The first '''DIAGRAM''' tab shows the block diagram of the '''TL-Verilog''' code.
 
|-  
 
|-  
 
|| Click on the '''VIZ''' tab
 
|| Click on the '''VIZ''' tab
|| The next is the '''VIZ tab. '''It''' '''is used for '''Visualization and Debug'''.
+
|| The next is the '''VIZ tab. '''It is used for '''Visualization and Debug'''.
 
|-  
 
|-  
 
|| Click on the '''WAVEFORM''' tab
 
|| Click on the '''WAVEFORM''' tab
 
|| The third''' WAVEFORM''' tab is used to view the simulated waveforms.
 
|| The third''' WAVEFORM''' tab is used to view the simulated waveforms.
 
|-  
 
|-  
||Point to the cross mark in''' '''the '''WAVEFORM''' tab
+
||Point to the cross mark in the '''WAVEFORM''' tab
  
  
Line 148: Line 150:
 
We see that there is a list of'''lint_off '''errors.
 
We see that there is a list of'''lint_off '''errors.
  
These errors are due to the '''lint_off''' commands which are already added in code.
+
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.
+
The''' lint_off commands''' are added as '''comments''' in the code.
 
|-  
 
|-  
 
|| Highlight the first error message
 
|| Highlight the first error message
|| The first error is a '''lint_off '''error due to the keyword '''LATCH'''.
+
|| The first error is a '''lint_off '''error due to the '''keyword LATCH'''.
 
|-  
 
|-  
 
|| Navigate to the '''EDITOR''' tab
 
|| Navigate to the '''EDITOR''' tab
Line 160: Line 162:
 
||
 
||
 
Press Ctrl+F and type '''LATCH'''  
 
Press Ctrl+F and type '''LATCH'''  
||For demonstration purposes, let us search the '''LATCH '''keyword in the '''EDITOR''' window.
+
||For demonstration purposes, let us search the '''LATCH keyword''' in the '''EDITOR''' window.
  
 
Press '''Ctrl+F '''keys together and type '''LATCH.'''
 
Press '''Ctrl+F '''keys together and type '''LATCH.'''
 
|-  
 
|-  
|| Navigate to the command '''verilator lint_off LATCH'''
+
|| Navigate to the '''command verilator lint_off LATCH'''
|| Navigate to the command '''verilator lint_off LATCH'''.
+
|| Navigate to the '''command verilator lint_off LATCH'''.
 
|-  
 
|-  
 
|| Delete '''verilator lint_off LATCH'''
 
|| Delete '''verilator lint_off LATCH'''
|| Since this command is throwing an error, let us delete it.
+
|| Since this '''command''' is throwing an error, let us delete it.
 
|-  
 
|-  
 
|| Only Narration
 
|| Only Narration
Line 204: Line 206:
 
||Click on the '''EDITOR '''tab.
 
||Click on the '''EDITOR '''tab.
  
Search for the '''reg '''keyword in the '''EDITOR '''window.
+
Search for the '''reg keyword''' in the '''EDITOR '''window.
 
|-
 
|-
 
|| Delete '''reg'''
 
|| Delete '''reg'''
|| Let us delete the '''reg '''keyword to avoid errors during compilation.
+
|| Let us delete the '''reg keyword''' to avoid errors during '''compilation'''.
 
|-
 
|-
 
|| Only narration
 
|| Only narration
Line 220: Line 222:
 
||Point to the tick mark
 
||Point to the tick mark
  
||After compilation, observe the tick mark near the '''WAVEFORM '''tab.
+
||After '''compilation''', observe the tick mark near the '''WAVEFORM '''tab.
 
It indicates that the code is now error-free.
 
It indicates that the code is now error-free.
 
|-
 
|-
 
|| Click on '''+sv '''and'''+counter4bit'''
 
|| Click on '''+sv '''and'''+counter4bit'''
|| Next click on''' +sv '''and'''+counter4bit tab '''on the left to view the waveform.  
+
|| 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
||Click on the '''ZOOM IN '''option at the top for a closer view of the''' waveform'''.
+
||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.
+
I will keep zooming in until the waveform is clearly visible.
 
|-
 
|-
 
|| Only Narration
 
|| Only Narration
 
||The '''counter '''output is not yet displayed.  
 
||The '''counter '''output is not yet displayed.  
Let us edit the code to display the '''counter '''output'''.'''
+
Let us edit the code to display the '''counter '''output.
 
|-
 
|-
 
||Highlight''' random()'''
 
||Highlight''' random()'''
  
 
Replace $'''random() '''with '''reset'''
 
Replace $'''random() '''with '''reset'''
||In the '''Editor '''window, we see the '''top''' module has '''random()''' signals by default.
+
||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'''.'''
+
So, let us replace '''random()''' with '''reset '''so that the '''counter''' gets the clock input.
 
|-
 
|-
 
||Click on '''Compile'''
 
||Click on '''Compile'''
Line 265: Line 267:
 
|-
 
|-
 
|| Highlighting the '''newsignal'''
 
|| Highlighting the '''newsignal'''
||We see the'''newsignal''' has been added in the waveform.
+
||We see the '''newsignal''' has been added in the waveform.
 +
 
 
In this way, the''' TLV code''' can be added.
 
In this way, the''' TLV code''' can be added.
 
|-
 
|-
Line 275: Line 278:
  
 
|| In this tutorial, we learnt to
 
|| In this tutorial, we learnt to
* Edit and  
+
* Edit and '''run simulations''' in the''' Makerchip IDE '''
* Run simulations in the''' Makerchip IDE '''
+
  
 
|-
 
|-
Line 288: Line 290:
 
* '''Compile '''and view the waveforms in the''' WAVEFORM '''tab.
 
* '''Compile '''and view the waveforms in the''' WAVEFORM '''tab.
 
* Add the required signals.
 
* Add the required signals.
* Recompile and verify the waveforms.
+
* Re'''compile''' and verify the waveforms.
  
 
|-  
 
|-  
Line 297: Line 299:
 
|-  
 
|-  
 
|| Show Slide: '''Spoken tutorial workshops'''
 
|| Show Slide: '''Spoken tutorial workshops'''
||The'''Spoken Tutorial''' Project team conducts workshops and gives certificates.
+
||The '''Spoken Tutorial''' Project team conducts workshops and gives certificates.
  
 
For more details, please write to us.
 
For more details, please write to us.
Line 305: Line 307:
 
|-  
 
|-  
 
|| Show Slide:''' FOSSEE Forum'''
 
|| Show Slide:''' FOSSEE Forum'''
|| For any general or technical questions on'''eSim''', visit the'''FOSSEE''' forum and post your question.
+
|| For any general or technical questions on '''eSim''', visit the '''FOSSEE''' forum and post your question.
 
|-  
 
|-  
 
|| Show Slide: '''Circuit Simulation Project'''
 
|| Show Slide: '''Circuit Simulation Project'''
||The'''FOSSEE''' team coordinates the'''Circuit Simulation Project.'''
+
||The '''FOSSEE''' team coordinates the'''Circuit Simulation Project.'''
 
For more details, please visit this site.
 
For more details, please visit this site.
 
|-  
 
|-  
 
|| Show Slide: '''Textbook Companion Project'''
 
|| Show Slide: '''Textbook Companion Project'''
||The'''FOSSEE''' team coordinates the'''TextBook Companion Project.'''
+
||The '''FOSSEE''' team coordinates the '''TextBook Companion Project.'''
 
For more details, please visit this site.
 
For more details, please visit this site.
 
|-  
 
|-  
 
||Show Slide: '''Lab Migration'''
 
||Show Slide: '''Lab Migration'''
  
||The'''FOSSEE''' team coordinates the'''Lab Migration Project.'''
+
||The '''FOSSEE''' team coordinates the '''Lab Migration Project.'''
 
For more details, please visit this site.
 
For more details, please visit this site.
 
|-  
 
|-  
 
||Show Slide:
 
||Show Slide:
 
'''Acknowledgement'''
 
'''Acknowledgement'''
|| The'''Spoken Tutorial'''project is funded by the Ministry of Education, Government of India.
+
|| The '''Spoken Tutorial'''project is funded by the Ministry of Education, Government of India.
 
|-  
 
|-  
 
||Show Slide: '''Thank you '''
 
||Show Slide: '''Thank you '''

Latest revision as of 15:35, 11 January 2023

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