Skip to content

Commit c0355b2

Browse files
committed
Final Blog : Project 5
1 parent 2bbeb32 commit c0355b2

4 files changed

Lines changed: 165 additions & 0 deletions

File tree

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
---
2+
title: "Enhanced Verilog Support & Stability: GSoC 2025 Final Report |Project 5|"
3+
date: 2025-08-31T14:04:00+05:30
4+
author: Vivek Kumar Ray
5+
type: post
6+
---
7+
8+
![gsoc-cover](/images/Vivek_Kumar_Gsoc2025/finalReport.png)
9+
10+
Hello Everyone😊,
11+
12+
Welcome to my final blog for Google Summer of Code 2025 for the project **Enhanced Verilog Support & Stability**
13+
14+
### What is the Project about🖥
15+
---
16+
17+
> **[_Enhanced Verilog Support & Stability:_](https://summerofcode.withgoogle.com/programs/2025/projects/9cZjeC5m)
18+
> The project works on the Verilog feature of CircuitVerse namely Circuit to Verilog and Verilog to Ciruit and its stability. The project works on taking the verilog feature to production, adding verilog modules for the circuit elements and removing bugs in the feature. The project also introduces new features like Verilog terminal, play/pause button to the simulator, improves the UI/UX of the verilog code-editor, updates the yosys repo, fixes bug ,implements full screen view for tools window and documents the verilog feature.**
19+
20+
### New features that have been added and merged include:
21+
- Verilog modules for circuit elements
22+
- Play/Pause button in the simulator
23+
- Improved UI/UX for code-editor
24+
- Verilog terminal
25+
- Resizable & draggable view of tools window
26+
- Yosys Upgradation
27+
28+
---
29+
30+
### Version confusion
31+
CircuitVerse had implemented the versioning system to avoid merging big changes to the simulator directly. This resulted in the formation of V0/, V1/ and SRC/ folders in the vue-simulator. Currently the V0 folder is default source but it can be changed by altering the configuration files. My changes were made and merged into the V1/ folder. In future all these folders will be in sync and users can change between the verisons easily.
32+
33+
### The Verilog feature in CircuitVerse includes
34+
1. Circuit to Verilog - allows users to convert circuit to verilog code
35+
2. Verilog to Circuit - allows users to convert verilog code to circuits
36+
37+
### Adding the Verilog Modules for Circuit Elements
38+
39+
CircuitVerse has the feature of generating Verilog code for the circuit designed in the Simualtor. The moduleVerilog() function is responsible for generating the verilog moduels for the Circuit element. Some of the circuit elements which are mentioned below don't have this module, this causes the calling of missing verilog functions. The goal of the first week was to add the verilog module for all the missing elements.
40+
41+
##### The Verilog Module for the following Circuit elements were added:
42+
43+
- SR Flip Flops
44+
- JK Flip Flops
45+
- ALU
46+
- D-Latch
47+
- ForceGate
48+
- LSB
49+
- MSB
50+
- TestBench element
51+
52+
**Checkout the Below Video for before and after fix**
53+
{{< video src="/videos/Vivek_Gsoc25/VerilogModule.mp4" type="video/mp4" preload="auto" >}}
54+
55+
**In total 7 verilog modules were added, some of them are displayed below : **
56+
![Circuit to Verilog](/images/Vivek_Kumar_Gsoc2025/ALUVerilog.png)
57+
![Circuit to Verilog](/images/Vivek_Kumar_Gsoc2025/adder.png)
58+
59+
### Bugs which were fixed in the Verilog Modules
60+
61+
- Wrong and incomplete verilog code for adder
62+
![adder](/images/Vivek_Kumar_Gsoc2025/adder.png)
63+
- Undefined parameters in the Flip Flops
64+
- Missing bitwidth support in some elements
65+
- Inconsistent verilog logic
66+
- SR flip flop wrong logic
67+
68+
### Yosys Upgradation and Migration
69+
70+
Yosysdigitaljs-server created by Marek Materzok is the technology behind the feature that allows users to convert Verilog code
71+
into circuits in the simulator.
72+
73+
![Yosys feature](/images/Vivek_Kumar_Gsoc2025/yosys.png)
74+
75+
The Circuitverse Yosys forked repo is behind its parent by some 39 PRs, the parent repo had been migrated from js to ts and even the folder structure has been changed.These changes include the server file to receive the request from circuitverse backend, docker file and other configuartion and minor changes from CircuitVerse.
76+
77+
![Verilog to circuit feature](/images/Vivek_Kumar_Gsoc2025/YosysCV.png)
78+
79+
The Yosys repo is now updated, folder structure updated & consistent with its parent and migrated to ts. In the future any changes to its parent can be easily merged with much conflicts between the two.
80+
81+
### Revamping the Verilog code editor and Verilog Terminal
82+
83+
CircuitVerse provides its users the feature of Verilog code editor. Which can be used by the users to write verilog code and then convert them into circuits and further integrate them into their circuits on the simulator.
84+
85+
##### The goal of the Code Editor is to:
86+
87+
- Enable writing and editing Verilog code inside CircuitVerse
88+
- Send code to a backend (powered by Yosys, an open-source synthesis tool)
89+
- and Parse the output and generate a visual circuit automatically
90+
91+
The Code Editor is built using CodeMirror — a powerful and customizable browser-based code editor.
92+
93+
##### The code Editor has the following features currently:
94+
- Syntax highlighting for Verilog
95+
- Smart indentation
96+
- Line numbering
97+
- Theme customization (Solarized, Monokai, Blackboard, and more)
98+
- Reset editor button
99+
100+
But the UI/UX of the code editor is not particularly encouraging for the users, also there are lots of features that can be added to it to make it better.
101+
102+
![Verilog to circuit feature](/images/Vivek_Kumar_Gsoc2025/updatedCodeEditor.png)
103+
104+
##### I have implemented the following things, which were proposed:
105+
- Improved indentation between code and line numbering, between numbering and the edge
106+
- CTRL + S shortcut for the save button
107+
- Option to increase the font size
108+
- Displaying error message properly, maybe a whole terminal experience to display the error message
109+
- Dark default theme in Vue-Simulator
110+
- Code completion
111+
- Code folding and bracket matching
112+
113+
### Verilog Terminal
114+
Verilog Terminal their circuits and perform other functions while conserving the resources of the browser. This feature allows users to stop the continuous simulation of their circuits
115+
116+
![Verilog Terminal](/images/Vivek_Kumar_Gsoc2025/verilogTerminal.png)
117+
118+
### Play/Pause Button to the Simulator
119+
The play/pause button stops the whole simulation engine, clock, and any UI updates for the circuit elements. This results in a complete pause of the simulator, which allows the users to build their circuits and perform other functions while conserving the resources of the browser. This feature allows users to stop the continuous simulation of their circuits, first pause the simulation, get their circuits ready, and then simulate it.
120+
This avoids confusion and helps users to perform other types of things like debugging, testbench, timming diagram and other functions in the simulator.
121+
122+
![Play pause button](/images/Vivek_Kumar_Gsoc2025/playPauseButton.png)
123+
124+
### Resizable & draggable view of tools window
125+
126+
reziable
127+
128+
### Verilog feature documentation
129+
130+
As part of this project, one of the primary tasks has been to document the verilog feature in deatil with examples for the CircuitVerse users. I have created detailed documentation for both the Verilog feature with examples for the CircuitVerse users to experiment with it and use them.
131+
132+
A special focus was also given to creating the documentation for the developers of the CircuitVerse so that they can easily setup the Verilog feature in thier local machine and develop it further.
133+
134+
##### Documenting the Verilog Features:
135+
136+
![doc1](/images/Vivek_Kumar_Gsoc2025/doc1.png)
137+
![doc2](/images/Vivek_Kumar_Gsoc2025/doc2.png)
138+
![doc3](/images/Vivek_Kumar_Gsoc2025/doc3.png)
139+
140+
---
141+
#### Pull Requests
142+
- PR : [Pr](https://github.com/CircuitVerse/cv-frontend-vue/pull/628)
143+
144+
145+
---
146+
## Learning
147+
148+
---
149+
150+
- Learned about VueJs and Simulation engine
151+
- Enhanced my Verilog knowledge and testbench writing skills
152+
- Learned about Yosys and TypeScript Migration
153+
- Learned and applied Object-Oriented coding practices
154+
- Enhanced and expanded my debugging skills
155+
- Learned Docker and networking between containers
156+
157+
## Conclusion
158+
159+
---
160+
161+
My journey so far has been exciting and amazing. Each week I stumble upon things I don't know, and I learn it, exeriment with it and then implement it. It has truly been a developers dream till now. My mentors and CircuitVerse community have been very helpful and inspirational in my little journey. Looking forward to contribute and learn more.
162+
163+
I would like to thank,
164+
[Aboobacker MK](https://github.com/tachyons), [Vedant Jain](https://github.com/vedant-jain03), [Niladri Adhikary](https://github.com/niladrix719), [Josh Varga](https://github.com/JoshVarga), [Aman Asrani](https://github.com/tachyons), and other mentors and circuitverse contributors for helping and mentoring me throught the journey.
165+
131 KB
Loading
26.9 KB
Loading
238 KB
Loading

0 commit comments

Comments
 (0)