Skip to content

All Working IC'S#4

Open
YashEkhande04 wants to merge 382 commits into
masterfrom
Working-IC1
Open

All Working IC'S#4
YashEkhande04 wants to merge 382 commits into
masterfrom
Working-IC1

Conversation

@YashEkhande04

Copy link
Copy Markdown
Owner

Related Issues

Purpose

Approach

@YashEkhande04 YashEkhande04 changed the title Working IC1 All Working IC'S Jul 10, 2025
pravin2007-ctrl and others added 29 commits January 12, 2026 12:54
Eyantra698Sumanto and others added 30 commits February 24, 2026 02:42
Added NGHDL and Verilator
Added nghdl folder with fixed src/model_generation.py to create order…
Refactor Dockerfile to remove eSim cloning, update dependencies, and adjust user setup.
Added instructions for copying files to a Docker container using the docker cp command.
Adding Subcircuits for Analog and Digital IC's in eSim ( Winter Internship)
Added detailed setup instructions for Docker and Python3, including steps for running the application on different operating systems.
Updated formatting for X11 mode instructions on macOS.
Migrate GUI framework from PyQt5 to PyQt6 (Closes FOSSEE#497)
…NgspiceWidget

This is the follow-up to FOSSEE#416 (esim-modularized-plotting). After the
initial merge I kept using the module and found a cascade of bugs that
needed fixing before the plotter is actually reliable. Full list with
root-cause analysis is in BUGS_AND_FIXES.md in the dev branch.

Security:
- BUG-006: Replaced raw eval() on user math input with _safe_eval()
  (AST-based, whitelists numeric literals + arithmetic ops only)

Core plotting bugs (plotter was effectively broken on first use):
- BUG-005: on_waveform_toggle did nothing — item.isSelected() always
  False because clicks were absorbed by the child QWidget. Replaced
  with an explicit toggle; also fixed plt.subplots_adjust() Tk crash.
- BUG-019: plot_function accumulated ghost traces — no cleanup of the
  previous Line2D before replotting. Added _func_line ref + remove().
- BUG-023: Cursor lines vanished on any refresh — fig.clear() wiped
  axvline objects, cursor_lines held stale refs. Added _restore_cursors()
  called after every refresh_plot.
- BUG-017: Autoscale checkbox was never connected to anything.
- BUG-018: zoom_in toggled rubber-band mode instead of zooming;
  zoom_out navigated back-stack instead of zooming out. Both replaced
  with proper center-of-axes scaling using DEFAULT_ZOOM_FACTOR.
- BUG-020: Escape key couldn't exit zoom/pan — hardwired to
  clear_cursors(). Now checks nav_toolbar.mode first.

Timing diagram bugs:
- BUG-007: plot_timing_diagram called .keys() on a List (AttributeError,
  swallowed by except). Also mutated shared obj_dataext.y in-place.
  Rewritten to build local y_data dict; obj_dataext never touched.
- BUG-009: Right-click Hide and left-click toggle used diverging state.
  Both now go through t.visible + refresh_plot().
- BUG-010: Single global 70% logic threshold replaced with per-trace
  midpoint (CMOS switches at VDD/2, not 70%).
- BUG-011: threshold_spinbox default was 0V not minimum, so "Auto" mode
  never activated. Added setValue(minimum()) after setRange.
- BUG-012: axhline drawn at raw threshold, not offset by rank*spacing.
  Replaced single line with per-rank loop.
- BUG-013: set_time_axis_label read unsliced obj_dataext.x after
  transient-start trim. Now accepts optional time_data arg.
- BUG-014: Constant DC signal mapped to all-low. Added vmax==vmin guard.
- BUG-021: Traces not normalized — voltage-dependent height caused
  overlap in mixed-voltage circuits. All traces now normalized to {0,1}.
- BUG-022: Timing view enabled for AC/DC analysis (meaningless output).
  Now disabled with tooltip for non-transient simulations.
- BUG-024: time_data rebind inside loop corrupted all subsequent traces.
  Fixed with per-iteration trace_time = time_data[:n].
- BUG-031: _detect_frequency received unsliced time_data instead of
  per-trace trace_time (contract violation).
- BUG-034: timing_annotations retained dead Text refs across view
  switches. Added .clear() in refresh_plot wipe block.
- BUG-036: Autoscale OFF + timing toggle restored normalized ylim into
  normal view. Added _last_was_timing guard.

Style / export / misc:
- BUG-025: change_style returned inside loop — only first item updated.
  Moved refresh decision outside loop.
- BUG-026: Local variable named 'format' shadowed Python built-in.
  Renamed to fmt.
- BUG-027: MultimeterWidgetClass had no owner ref — could be GC'd.
  Added self._meters list; closeEvent cleans up.
- BUG-028: open_figure_options called fig.suptitle('') to read title,
  which also set it to ''. Fixed with fig._suptitle read.
- BUG-029: 'vs' substring check matched node names like v(vss).
  Changed to ' vs ' with spaces + maxsplit=1.
- BUG-030: c= kwarg used for plot()/step()/semilogx() — documented only
  for scatter(). Renamed to color=.
- BUG-032: steps-post style rendered as steps-pre — axes.step() default
  is where='pre'. Added plot_kwargs dict with where='post'.
- BUG-035: Three independent time-scale chains, two missing zero-span
  case. Extracted _get_time_scale_and_unit() as single source of truth.
- BUG-016: Right-click opened Qt context menu AND placed cursor 2
  simultaneously. Removed canvas context menu (Qt.NoContextMenu);
  left/right click now map cleanly to C1/C2. Added drag-to-move.
- REFACTOR-001: Replaced 6 parallel trace dicts with TraceModel.
  Trace.update_line() handles live style/color/thickness without replot.

New feature:
- FEATURE-001: Timing view right-side annotations: VOH/VOL labels (H:/L:)
  with SI-prefixed values, frequency label for periodic signals using
  rising-edge CV filter to suppress glitch/one-shot false readings.
  Constant DC signals show DC: label. Current traces use A/mA/µA/nA.

Full rewrite. Old parser read each file 2-3 times with fragile
line-index arithmetic and broke on single-column-group circuits
(BasicGates: produced 164 pts, should be 166 — pre-existing bug fixed).

New: single-pass state-machine (_parse_plot_file), handles multiple
column groups + page-break headers, all three analysis types.
Public interface unchanged — openFile/computeAxes/numVals call sequence
still works; all attributes still exist.

Also fixed: BUG-033 — log label order was wrong (AC/DC/Tran indices
mapped to wrong strings). Replaced positional split with explicit dict.

Verified identical output across 11 Example circuits:
Transient (Monostable555 205k pts, Half_Adder, BasicGates),
DC (BJT_CE_config nested sweep, FET_Characteristic),
AC dec (High_Pass_Filter, Low_Pass_Filter, BJT_Frequency_Response 701 pts),
AC lin (Parallel_Resonance),
Tran+subcircuit (Integrator_LM_741 27 nodes w/ duplicate names,
Precision_Rectifiers_using_LM741 76 nodes).

- BUG-008: Dead plotFlag read removed (was never written anywhere).
  plotFlag2 renamed to redoPlotFlag (also updated in TerminalUi.py).
  Unquoted shell commands fixed: gaw and xterm use shlex.quote();
  mintty switched from single shell string to QProcess.start(prog, args).
- BUG-015: MergedChannels collapsed stderr into stdout, making the
  ngspice noise filter permanently dead. Changed to SeparateChannels
  with dedicated _handle_stdout / _handle_stderr slots.
- REFACTOR-002: _register_process() extracted from duplicated 4-line
  pattern in _start_process and open_ngspice_plots.

Renamed setProperty("plotFlag2") → setProperty("redoPlotFlag") to
match NgspiceWidget.py rename. Must move together with NgspiceWidget.
- QListWidget.MultiSelection → SelectionMode.MultiSelection
- menu.exec_() → menu.exec()
- QProcess.SeparateChannels → ProcessChannelMode.SeparateChannels
- error_type <= int comparison (TypeError) → enum tuple membership check
- QProcess.NotRunning (×2) → ProcessState.NotRunning in TerminalUi
…overhaul

fix(plotting): ngspice plotting module - data extraction rewrite + correctness fixes (follow-up to FOSSEE#416)
Fixing issue number FOSSEE#283 "New Project creation has "The project name should not contain space between them" even though there is no space. FOSSEE#283"
Added subcircuit files to SubcircuitLibrary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.