Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • N netlist_simulator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Paul Fournier
  • netlist_simulator
  • Wiki
  • Implementation

Implementation · Changes

Page history
Update Implementation authored Nov 12, 2020 by Paul Fournier's avatar Paul Fournier
Show whitespace changes
Inline Side-by-side
Implementation.md
View page @ 41409b14
......@@ -5,7 +5,7 @@ As mentionned in the readme, the simulator and its environment run in a simple f
1. Read and parse the netlist (as provided in the documentation, `netlist.ml`, `netlist_ast.ml`, `lexer.ml`, `parser.ml`)
2. Order the netlist according to the dependencies via a topological sort (`graph.ml`, `scheduler.ml`, see [the scheduler doc](/Functions#scheduler))
3. Simulate the netlist in a sequential fashion (`simulator.ml`, see [the simulator doc](Functions/#simulator))
1. Initialize the memory (currently the ROM cannot be inputted from the user)
1. Initialize the memory (see [Initialization](#initialization) for how ROM is constructed).
The memory is represented by its id. Memory is implemented via hash-tables, see [the corresponding part](#memory).
2. Take the input, see [Input](#input).
3. Make the combinatorial computations for a cycle, see [Computations](#computations).
......@@ -13,6 +13,13 @@ As mentionned in the readme, the simulator and its environment run in a simple f
5. Give the output, see [Output](#output).
6. Go back to 2. if there are other steps to simulate.
# Initialization
The ROM is read in the folder defined by the user at the call of the program. By default, it is `./ROM`. The files are called `romid.rom` with `romid` the id of the ROM as indicated in the netlist file. This file, hereby named `id.rom` represents the content of the ROM, in the following fashion :
- One line of the file = one word of the ROM
- One line is a bit-word written in little-endian fashion, no more, no less. Nothing else than a string of 0s and 1s of the correct length will be accepted. Be prepared to be violently yelled at by the simulator at every teeny-weeny ever so slightly badly formatted line in the file. You've been warned.
- The file represents the first addresses of the ROM : it will fill contiguously from the start on, and the end of the file will indicate that the ROM is empty afterwards.
# Memory
There are two kinds of things to memorize during the simulation :
......
Clone repository
  • Functions
  • Implementation
  • Home