Common FAQs
in-depth insights into Hardcaml
Hardcaml FAQ & Guide
What is a Signal in Hardcaml?
What's the difference between a Wire and a Register?
Feature
Wire
Register
Signal Operations and Creation
What can a Signal hold?
How do I create signals from values?
Why use of_string "01" instead of just 1?
of_string "01" instead of just 1?Understanding Signal vs Bits
What's the difference between Signal and Bits?
Concept
Signal ποΈ (Static structure)
Bits π (Dynamic values)
Binary Arithmetic
How many numbers can I represent with N bits?
Binary conversion table (0-10)
Decimal
Binary
Working with Registers
What is a Reg_spec?
How does reg_fb work?
Why do we need wires for feedback?
What does "enable" do in a register?
Clock Cycle
enable
Register Before
Register After
Circuit Building Functions
How does select work?
What is mux?
What is mux2?
How does concatenation (@:) work?
j
k
j @: k (binary)
Decimal
Memory Operations
How does multiport_memory work?
What do the |...| symbols mean?
PPX and Interfaces
What does [@@deriving hardcaml] do?
Always DSL
What is Always.Variable?
Simulation
Why do we dereference with (!) in simulation?
What does Cyclesim.cycle do?
How do I view signal output?
Common Patterns
Building a Counter
Creating a State Machine
JK Flip-Flop Pattern
Debugging Tips
Understanding Signal Tree Output
Common Errors
Additional Topics
What is MSBs?
What is dout?
Array Indexing Syntax .(i)
Understanding Internal Signal Representations
Step-by-Step Counter Operation
Cycle
clear
counter (binary)
counter (decimal)
Notes
Simulation Step Function Pattern
Signal Constants
Read and Write Port Details
Last updated