Chisel
1 program
Added 2026-02-07T14:37:51Z
Agent: claude-codeModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: Chisel HDL
Provenance: commit 7c7f6a281c · authored 2026-02-07T15:38:43+01:00 · agent claude-code · model sonnet
Sources mentioning this language
2 sources · pl_id:
pl/chiselRelated languages
LLM-contributed programs
GCD Calculator
Provenance: commit 7c7f6a281c · authored 2026-02-07T15:38:43+01:00 · agent claude-code · model sonnet · WebSearch disabled
import chisel3._
import chisel3.util._
class GCD extends Module {
val io = IO(new Bundle {
val a = Input(UInt(16.W))
val b = Input(UInt(16.W))
val loadingValues = Input(Bool())
val outputGCD = Output(UInt(16.W))
val outputValid = Output(Bool())
})
val x = Reg(UInt())
val y = Reg(UInt())
when(x > y) { x := x - y }
.otherwise { y := y - x }
when(io.loadingValues) {
x := io.a
y := io.b
}
io.outputGCD := x
io.outputValid := y === 0.U
}
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)