Jasper RTL Design Bringup
Jasper RTL Design Bringup
February 2023
Copyright Statement
© 2024 Cadence Design Systems, Inc. Cadence and the Cadence logo are
registered trademarks of Cadence Design Systems, Inc. All others are the property
of their respective holders.
• Learn how Jasper Design Bringup can accelerate your design process.
• Learn to use Jasper FPV as an “instant testbench” for design exercise
much more efficiently than creating a simulation testbench.
• Learn key features of Jasper Visualize™ to explore the design
behavior.
• Gain confidence in early RTL, before handing off to validation.
• A Motivating Demo
• Formal as Compared to Simulation
• Design Bringup: Challenges and Solutions
• Design Bringup: Lab
• A Motivating Demo
• Formal as Compared Simulation
• Design Bringup: Challenges and Solutions
• Design Bringup: Lab
• A Motivating Demo
• Formal as Compared to Simulation
• Design Bringup: Challenges and Solutions
• Design Bringup: Lab
• FUD Factor
− Complexity: Will I get stuck?
− Coverage: How do I understand?
− Be careful: Due to assumptions, you cannot expect 100% coverage
− Integration with simulation coverage?
− Training: Can I learn this new thing?
− Setup Time: New types of collaterals, not old UVM tests
• A Motivating Demo
• Formal as Compared to Simulation
• Design Bringup: Challenges and Solutions
• Design Bringup: Lab
Assume {behavior}
bbox Constrain
Assert {behavior}
Done Check
Quiet
Trace
Debug Debug
Debug Export
generic design- Save
interface
failures
behaviors
w/ Superlint
specific
behaviors
waivers
properties for
simulation Handoff!
26 © 2024 Cadence Design Systems, Inc. DO NOT DISTRIBUTE.
When is your design ready to handoff to verification?
• A Motivating Demo
• Formal as Compared to Simulation
• Design Bringup: Challenges and Solutions
• Design Bringup: Lab
• These should display the Jasper version. You should be running with 2021.06FCS
or newer.
• Unpack the RAK distribution package in your work area. This document and all
files needed to run the example are included in the package.
0 Bit 0 0 Bit 0
• The elevator controller is responsible for determining when 0 Bit 1 0 Bit 1
the elevator should move up or down or stop. 1 Bit 2 1 Bit 2
Request 0 Bit 3 1 Bit 3
Button[3]
• There is a single request input (request_button) for
each floor. Once request_button for any floor is high, it
is set in the floor_to_stop_at array. Request
0 Bit 14 1 Bit 14
Button[14]
1 Bit 15 0 Bit 15
• The FSM decides if the elevator goes up or down or waits.
Floor_done=‘d15
• When floor_to_stop_at is reached, floor_done
indicates which bit to clear. The elevator then waits until
ready_to_move goes high again.
elevator_top.v
Door
Door_motor_control
• The going_up flag toggles from high to low if the Open/Close
door_controller
floor_done vector equals cfg_reg_top_floor. It Sense ready_to_move
toggles from low to high when it equals 1. Current
Floor[3:0]
0
0
• The door_controller instance (black boxed) provides Request 1
0 floor_done FSM Elevator
the ready_to_move signal that tells FSM when the doors Button[15:0]
0
cfg_reg_top_floor
Control
have closed, and the elevator can move again. 1
(Up/Down/
floor_to_stop_at Stop)
going_up? cfg
floor_to_stop_at[next floor]
ready_to_move &&
||
going_up current_floor==1
• This means that Jasper can wiggle each blackbox output any way
that it wants in ANY cycle! FSM
• How you can constrain this behavior will be shown later in the RAK.
• For more details on blackboxing commands, see Tcl Help for the
elaborate command or the following video: Because door_controller is
– Article (20467784) An Introduction To Elaborating Designs in black boxed, ready_to_move and
Jasper (Video)
https://support.cadence.com/apex/ArticleAttachmentPortal?id=a door_motor_control can take
1O0V000007MnuKUAS
ANY value in ANY cycle!
• Copy the text at the right (or from # Compile HDL files
<RAK_install>/solution/compile_rtl.tcl) to create your Tcl
file. analyze -sv elevator_top.v
elaborate -top elevator_top -bbox_m
• For more information about analyze and elaborate, see the door_controller
following videos:
Article (20467785) Introduction to the Analyze Command for Jasper (Video)
https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1O0V00000
7MnuoUAC
Article (20467784) An Introduction To Elaborating Designs in Jasper (Video)
https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1O0V00000
7MnuKUAS
• You will see the Jasper GUI with the design loaded
• Before you run Jasper on your design, you need to define the clock and
reset.
• For simple designs, use the following Tcl commands in the Jasper Console:
clock <your_clock>
reset <your_reset>
• In the next section, you will see how to use the clock viewer and reset
analysis to help you declare clock and reset.
• You will see that one reset pin named rst was
found.
• Press OK to finish.
• Now, you need to plan the good behaviors to exercise more systematically
• As you exercise the design, you will capture additional behaviors as properties that can
be handed off to other simulation and formal teams
• You iterate between exercising and capturing properties until you are satisfied
Iterate
Exercise Design
• Exercise the good behaviors in your plan
• Interactively visualize these good
behaviors
• Inspect these waveforms for bad
behaviors
• Now, start with planning out the good behaviors you want to exercise
• You want to check some parts of the design for simple reachability. For example, you can check that all FSM states can be reached.
• You also have functional sequences you can exercise. In this case, you want to observe that the elevator can go all the way up and down and that
the top floor can be reprogrammed
• Rather than telling Jasper what you want to do with the inputs, you tell it what you want to observe. Jasper will generate the input stimulus required to
show the behavior
• The plan has been color-coded against the block diagram to show which tests are exercising each part of the design
• Reachability
– All FSM states and transitions are reachable elevator_top.v
Door Door_motor_control
– All valid output states are reachable Open/Close
door_controller
Sense ready_to_move
– Configuration bits can be programmed
• Functional Sequences Current
Floor [15:0]
– Elevator goes all the way up and down twice (UP > 0
0
1
FSM
Request floor_done
Down > Up > Down) Button[15:0]
0 Elevator
Control
– Elevator goes up, then stops, then continues going
0
1 cfg_reg_top_floor
(Up/Down/Stop)
up, then goes down (UP > Wait> Up > Down) floor_to_stop_at
going_up? cfg
– While going up, you reprogram the top floor (UP >
CFG > UP > CFG > Down)
– Elevator goes all the way up and down twice (UP >
state==ELEVATOR_DOWN ##[1:$]
state==ELEVATOR_UP ##[1:$]
state==ELEVATOR_DOWN);
Down > Up > Down)
– Elevator goes up, then stops, then continues going // This cover shows requests coming in while we are going up. So we have to stop along the way to the highest floor
up, then goes down (UP > Wait > Up > Down) cov_elevator_top_up_wait_up_wait_down:cover property (@(posedge clk) state==ELEVATOR_UP ##5
state==WAIT ##6
– While going up, you reprogram the top floor (UP > state==ELEVATOR_UP ##3
state==WAIT ##[1:$]
CFG > UP > CFG > Down) state==ELEVATOR_DOWN);
// This cover shows the upper floor being re-programmed as we are going up
cov_elevator_top_up_cfg_up_cfg_down: cover property (@(posedge clk) state==ELEVATOR_UP ##[10:$]
~$stable(cfg_reg_top_floor) ##[1:$]
state==ELEVATOR_UP ##[1:$]
~$stable(cfg_reg_top_floor) ##[1:$]
state==ELEVATOR_DOWN);
49 © 2024 Cadence Design Systems, Inc. DO NOT DISTRIBUTE.
Exercising the design
• Now that you have your “good behavior” cover properties, reload the run_elevator_top.tcl
script, which will recompile your design to include these properties
• You will now see that there are 18 cover properties in the design:
• If you type fsm in the property filter box, you can see that all your FSM states and transitions have been reached:
• Reachability
– All FSM states and transitions are reachable
– All valid output states are reachable
– Configuration bits can be programmed
• Functional Sequences
– Elevator goes all the way up and down twice (UP >
Down > Up > Down)
– Elevator goes up, then stops, then continues going up,
then goes down (UP > Wait > Up > Down)
Note: You may see different information here,
– While going up, you reprogram the top floor (UP →
depending on the tool version and settings. This
CFG > UP > CFG > Down)
RAK will not cover formal engines.
• By browsing/filtering Property Table, you can quickly see that all your reachability requirements have been met!
• Because you used a good naming convention for your properties, searching for properties is easier
• You want to inspect the waveform to confirm that the behavior is reached in a ”reasonable” way. This might
not be the only way it can be reached, but it is often the shortest.
• Reachability
– All FSM states and transitions are reachable
– All valid output states are reachable
– Configuration bits can be programmed
• Functional Sequences
– Elevator goes all the way up and down twice (UP >
Down > Up > Down)
– Elevator goes up, then stops, then continues going up,
then goes down (UP > Wait > Up > Down)
– While going up, you reprogram the top floor (UP >
CFG > UP > CFG > Down)
• The Visualize window displays, showing the trace where the cover property is reached
• Something does not look right. You see that FSM is transitioning too quickly. It is toggling between
down and up several times within only 12 cycles!
• Right-click on the value of state in cycle 8 and choose Add Relevant Input/Undriven Signals
• You notice that the current_floor input is not behaving legally. It is jumping randomly from floor to floor!
• Use the zoom buttons on the toolbar to zoom in to see what is going on.
Not legal!
• If you scroll through Property Table, you will now see your three
new assumptions:
• In the Property Table filter bar, type up_down_up_down to search for the property
you previously looked at:
• Double-click on the property to open the trace, which will now have all your
assumptions applied.
• This is a bug!
35
• You will see that there are two SVA checkers, one for ELEVATOR_UP and another for
ELEVATOR_DOWN
• Edit elevator_top.v and copy the SVA checker properties as shown below. Paste
them at the bottom of the RTL, just above endmodule. You can also copy these directly
from <RAK_install>/solution/sva_checker_properties.txt.
// ***************************************************************************
// Assert correct behavior of the elevator controller
// ***************************************************************************
ast_elevator_top_stop_at_next_floor_down: assert property (@(posedge clk) state==ELEVATOR_DOWN &&
floor_to_stop_at[current_floor-1] |=> state==WAIT) else $display ("ERROR: did not stop at floor correctly when going down");
• Next, you add a property to the ready_to_move signal as follows, so that if you black box
door_controller, the property is an assumption. If door_controller is not black boxed, it is
an assertion.
Copy from <RAK_install>/solution/sva_door_controller_properties.txt Add the following (in red) to run_elevator_top.tcl
to bottom of elevator_top.v, above “endmodule” # Clear environment
// clear -all
**********************************************************************
// Assume or Assert behavior at the output of the door controller
// Note: Here we are showing one way to convert assumptions to # Compile HDL files
assertions using a `define analyze -sv elevator_top.v +define+DOOR_CONTROLLER_IS_BBOXED
// elaborate -top elevator_top -bbox_m door_controller
**********************************************************************
`ifdef DOOR_CONTROLLER_IS_BBOXED clock clk
asm_door_controller_output_ready_to_move: assume property reset rst
(@(posedge clk) state==WAIT |-> ##[1:20] ready_to_move) else $display
("ERROR: ready_to_move failed to occur in the required time"); assume -from_assert
`else <embedded>::elevator_top.ast_elevator_top_input_next_floor_up
ast_door_controller_output_ready_to_move: assert property assume -from_assert
(@(posedge clk) state==WAIT |-> ##[1:20] ready_to_move) else $display <embedded>::elevator_top.ast_elevator_top_input_next_floor_down
("ERROR: ready_to_move failed to occur in the required time"); assume -from_assert
`endif <embedded>::elevator_top.ast_elevator_top_input_current_floor_behavior
• If you search for ready_to_move with the Property Table filter, you will now see your new assumption on the
ready_to_move signal. In addition, Jasper has created an automatic cover property that checks to ensure that
the precondition of your assumption can be covered!
• Support
Cadence Learning and Support Portal provides access to support resources, including
an extensive knowledge base, access to software updates for Cadence products, and
the ability to interact with Cadence Customer Support. Visit
https://support.cadence.com.
• Feedback
Email comments, questions, and suggestions to [email protected].