Skip to content

YinglanCat/NexSim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

40 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ NexSim โ€“ Next Gen Online Circuit & MCU Simulation Platform

NexSim is a browser-based platform offering Online Circuit Simulation + MCU Simulation + Cloud IDE + Instrument Toolkit. Inspired by Wokwi, NexSim features a modernized architecture, rich extensibility, and a dual-form structure capable of running both in the cloud and on dedicated hardware teaching platforms.


๐Ÿ€ Version 1: NexSim Cloud (Online Edition)

No software installation required. Open your browser and start using it immediately. This is the core experience of NexSim.

๐Ÿš€ Key Features

โšก Instant MCU Simulation (In-Browser)

  • avr8js Integration: AVR/ATmega (Arduino) simulation.
  • rp2040js Integration: Raspberry Pi Pico / RP2040 simulation.
  • Future Support: ESP32 (QEMU WebAssembly), ARM Cortex cores.
  • Hybrid Mode: Supports Frontend WASM + Backend Python-QEMU mixed simulation.

๐ŸŒ Cloud IDE (SvelteKit + Web Editors)

  • Integrated browser code editor (Monaco / Codemirror).
  • Syntax highlighting, auto-completion (LSP optional).
  • One-click Compilation: Auto-load simulation kernel.
  • Built-in Serial Terminal / Log Output / Debug Interface.

๐Ÿ”Œ Node-based Circuit Canvas (NexSim-Flow Editor)

  • Konva.js Based: A generic, drag-and-drop circuit canvas providing a "Pro EDA" experience similar to Altium Designer.
  • Features:
    • Drag & Drop components: LEDs, Buttons, Sensors, Displays, etc.
    • Pin Connections -> Auto-generate Netlist.
    • Visualized Device Properties & Interaction.
  • Extensible: Devices are driven by TypeScript/Svelte components.

๐Ÿง  Unified sim-protocol

  • Consistent JSON protocol across Web IDE โ†” Bun Backend โ†” Python Simulator.
  • Covers: Pin states (pins), Serial messages (serial), Device events (button press), and Simulation control.

๐Ÿ‡ High-Performance Backend (Bun + ElysiaJS)

  • Core Services: User Projects (Save/Share), Compilation Service (avr-gcc/pico-sdk), WebSocket Hub.
  • Database: Prisma ORM + SQLite/PostgreSQL.

๐Ÿ Python Simulation Service (Optional)

  • Built with FastAPI.
  • Provides NEXsim-Core MCU engine (QEMU/Renode) for complex SOCs (e.g., ESP32).
  • Compatible with Wokwi API.

๐Ÿ”ง Version 2: NexSim Modules (Hardware Platform)

Deployed on the proprietary Nex-Modules platform, a system based on ARM SBCs + Pluggable Modules.

"Pack an entire electronics lab into a backpack โ€” Grab and Go."

๐Ÿ“ฆ Module Ecosystem

  • Sensor Modules: Physical sensors integration.
  • IO Modules: LED, Button, Motor, Buzzer.
  • Instruments: Digital Oscilloscope, Logic Analyzer, Adjustable Power Supply.
  • Debuggers: gdb, jlink, daplink, jtag.
  • Tools: JBC Soldering Station Control, LCR Meter, IยฒC/SPI/UART Sniffers.

๐Ÿ› ๏ธ Local Enhancements

๐Ÿ”„ Hardware Real-time Interaction (Hybrid Simulation)

  • Virtual MCU โ†” Physical Sensors: Code running in browser controls real sensors.
  • Physical MCU โ†” Virtual Devices: Real chips control virtual LEDs/Screens.
  • Use Cases: Rapid Prototyping, Lab Classes, Teaching Demos, Competitions.

๐Ÿงต Unified HDAL (Hardware Abstraction Layer)

  • All physical hardware is abstracted via HDAL.
  • Fully compatible with sim-protocol, ensuring consistency between Cloud and Module versions.
  • Supports Hot-Swapping of modules.

๐Ÿ’ป Local LAN IDE

  • Access the NexSIM Web IDE directly from the ARM board via a local network.
  • Low latency, ideal for offline labs or classrooms.

๐Ÿ—๏ธ Architecture

graph TD
    subgraph Frontend [Web Frontend]
        A[SvelteKit + SvelteFlow]
        B[Web Editor + UI]
    end

    subgraph Backend [Backend]
        C[Bun + ElysiaJS + Prisma]
        D[Auth / Project / Compiler / WS Hub]
    end

    subgraph Sim [Python Simulator]
        E[FastAPI + MCU Engines]
        F[QEMU / Custom Core / Extensions]
    end

    Frontend <-->|sim-protocol \(WS\)| Backend
    Backend <-->|Cloud / Local| Sim
Loading

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •