DEV Community

Nihal Rajpal
Nihal Rajpal

Posted on

GSoC 2025 – Week 1: Shift Happens🔄

This week (June 2–8) marked a big shift — not just in terms of clock signals and data bits (hello shift registers!), but also a personal shift from the Community Bonding Period to the real deal: the Coding Phase of GSoC.

The coding period kicked off and I dove straight into implementing shift registers — SISO, SIPO, PISO, PIPO. Classic stuff. The first question was: do I create separate components for each? Or just one smart, configurable one?

Took a inspiration from Logisim, discussed with mentor and went with the second one. Just one “Shifter” component with properties like parallelLoad: yes/no. Cleaner UI, less clutter, and feels more user-friendly.

Then came the design phase. I built the component UI using the Canvas API. Control signals (Reset, Clock, Shift/Load) go on the top, and inputs/outputs on the bottom. As you increase the number of stages, the bottom part grows — dynamic and neat.

Shift Component

Initially had it in vertical layout, but then switched to horizontal because it just makes more sense when visualizing right shifts.

With the UI structure done, I started implementing the core logic in the resolve() method. This method detects rising clock edges and handles:

  1. Resetting the register
  2. Parallel loading the input data
  3. Shifting values serially to the right

Everything seemed fine — until it came....

🐛 The Unexpected Issue

Strangely, I noticed that the resolve() method wasn’t being called at all during simulation. I checked the logic, rewrote parts of it, even added logs — nothing. Eventually, I rolled back and tried running the same code outside the versioned folder (v0), and it worked perfectly.

That gave me a strong hint: the issue was somehow tied to the versioning structure. I’m still not sure why this happens, so I decided to take it up with my mentor Aman Asrani. Meanwhile, to keep the flow going, I completed the implementation without using the versioned folder.

Towards the end of the week, I tested edge cases, tweaked a few last-minute design elements (like defaulting to horizontal layout), and handed over the logic for review. I’m now waiting on the versioning issue to be resolved, after which I’ll raise a proper PR for this new component.

Looking forward to Week 2 — and hopefully resolving the versioning quirk! 🚀

Top comments (0)