SystemVerilogCourse

repository·production·Indexed 41 days ago

https://github.com/mbits-mirafra/systemverilogcourse

An educational repository providing a detailed SystemVerilog course with instructional material, hands-on labs for experimentation, and access to the 2017 IEEE LRM. Includes configuration details for nWave, such as simulator command syntax, FSM visualization, coverage weighting, and waveform display settings for tools like ModelSim, Questa, NC-Sim, and Xcelium.

Tokens
1.6K
Snippets
1
Records
9
Agent score
51%

What's inside SystemVerilogCourse

  1. Access the SystemVerilogCourse documentation and LRM

    production
    The SystemVerilogCourse provides detailed instructional material and required labs for SystemVerilog experimentation. You can access the comprehensive course documentation via the project Wiki and refer to the IEEE standard for SystemVerilog (2017) for formal language specifications.
  2. Configure Command Syntax for different simulators in nWave

    production

    The novas.rc file allows mapping nWave commands (like stepping, breaking, or resetting) to specific syntax required by different simulation engines. This is defined under [CommandSyntax.<simulator_name>] sections.

    Key command mappings include:

    • RunContinue: Command to continue simulation.
    • Finish: Command to exit/quit simulation.
    • NextTime: Command to advance simulation by a specific time.
    • NextEvent: Command to advance to the next event.
    • Reset: Command to reset the simulation state.
    • ObjPosBreak/ObjNegBreak/ObjAnyBreak: Commands to set breakpoints on signal edges or changes.
    • LineBreak: Command to set a breakpoint at a specific source code line.
    • EnableBP/DisableBP/DeleteBP: Commands to manage breakpoints by ID.
    • SimSetScope: Command to change the current simulation scope.
  3. Configure User Buttons for simulators in nWave

    production

    You can define custom UI buttons in nWave that execute specific simulator commands. These are configured under [UserButton.<simulator_type>] sections. Each button is defined by a number (e.g., Button1) and a string containing the command to execute.

    Example mappings for different simulators:

    • mixnc (Mixed NC)
    • mti (ModelSim/Questa)
    • mti_vlog (ModelSim/Questa Verilog)
    • nc (NC-Sim)
    • scs (SystemC)
    • vhnc (VHNC)
    • xl (Xcelium/Incisive)

    Commonly mapped actions include:

    • Signal Dumping: Dump All Signals, Dump On, Dump Off.
    • Simulation Stepping: Next 1000 Time, Run Step, Run Next.
    • Variable Manipulation: Show Variables, Force Variable, Release Variable, Deposit Variable.
  4. Configure Coverage Display and Limits

    production

    The [CoverageDetail] section controls how coverage data is visualized and the thresholds for various coverage metrics in nWave/Verdi.

    Key settings include:

    • cross_filter_limit: Limit for cross coverage filtering.
    • tglMda: Threshold for Toggle coverage.
    • linecoverable/lineuncovered: Thresholds for line coverage visibility.
    • tglcoverable/tgluncovered: Thresholds for toggle coverage visibility.
    • showgrid: Enables/disables the display grid in coverage views.
  5. Configure Coverage Detail and Weighting

    production

    nWave provides settings to control how coverage data is displayed and weighted in the UI.

    Coverage Detail Settings ([CoverageDetail]):

    • cross_filter_limit: Limit for cross coverage filtering.
    • showgrid: Toggle grid visibility.
    • tglcoverable / tgluncovered: Thresholds for toggle coverage display.
    • linecoverable / lineuncovered: Thresholds for line coverage display.

    Coverage Weighting ([CoverageWeight]): Defines the relative importance/weight of different coverage types. Set to 1 to enable/include:

    • Assert
    • Covergroup
    • Line
    • Condition
    • Toggle
    • FSM
    • Branch
  6. Customize FSM (Finite State Machine) Visualization

    production

    The [FSM] section allows for extensive customization of how Finite State Machines are rendered in the nWave viewer. You can control colors, line widths, and fill styles for various FSM components:

    • States: State-LineColor, State-LineWidth, State-FillColor, State-TextColor.
    • Special States: Init_State, Trap_State (can be customized with unique colors like yellow3 or red3).
    • Transitions: Transition-LineColor, Transition-LineWidth, Transition-FillColor, Trans_Condition-LineColor.
    • Actions: State_Action and Trans_Action visual properties.
    • Junctions/Connections: Junction-LineColor, Connection-LineColor.
    • Selection: SelectedSet-LineColor, HilightSet-LineColor.
  7. Configure Waveform Display and Signal Appearance

    production

    The [Wave] section manages the visual properties of the waveform viewer.

    Key configuration areas:

    • Signal Colors: Defines colors for different signal types (e.g., Input_Signal, Output_Signal, Verilog_Signal, VHDL_Signal, SystemC_Signal).
    • Event Colors: Colors for assertion successes/failures (e.g., ovaAssertSuccessColor, ovaAssertFailureColor).
    • Display Modes: Settings for zooming, scrolling, and signal grouping (e.g., DragZoomTolerance, signalSpacing, qdsAutoBusGroup).
    • Bus/Signal Layers: Visual styles for different bus states (e.g., busXLayer, busZLayer, busNoValueLayer).
  8. Configure FSM (Finite State Machine) Visualization

    production

    The [FSM] section defines the visual style for Finite State Machine diagrams, including colors, line widths, and fill styles for various components.

    Components that can be styled include:

    • State: General state appearance.
    • Init_State: The initial state.
    • Trap_State: Trap or error states.
    • State_Action: Actions associated with a state.
    • Junction: Connection points.
    • Connection: Lines between states.
    • Transition: The movement between states.
    • Trans_Condition: Conditions required for a transition.
    • Trans_Action: Actions performed during a transition.
  9. Configure User Buttons for simulation control in nWave

    production

    You can define custom button actions for specific simulation tools within the novas.rc file using the [UserButton.<simulator_name>] sections. Each button is assigned a label and a command string to execute.

    Commonly configured simulators include:

    • mixnc (Mixed NC)
    • mti (ModelSim/Questa)
    • mti_vlog (ModelSim/Questa Verilog)
    • nc (NC-Sim)
    • scs (SystemC)
    • vhnc (Verilog HDL NC)
    • xl (Xcelium)

    Example button definitions for mti allow for dumping signals, stepping through time, and forcing/releasing variables.

    [UserButton.mti]
    Button1 = "Dump All Signals" "fsdbDumpvars\n"
    Button2 = "Next 1000 Time" "run 1000\n"
    Button3 = "Next ? Time" "run ${Arg:Next Time}\n"
    Button4 = "Show Variables" "exa ${SelVars}\n"
    Button5 = "Force Variable" "force -freeze ${SelVar} ${Arg:New Value} 0\n"
    Button6 = "Release Variable" "noforce ${SelVar}\n"
    Button7 = "Deposit Variable" "force -deposit ${SelVar} ${Arg:New Value} 0\n"