clash-ghc-0.3: primitives/clash.prelude.json
[ { "BlackBox" :
{ "name" : "CLaSH.Prelude.blockRam"
, "templateD" :
"~SYM[0]_block : block
type ram_array is array (natural range <>) of ~TYP[8];
signal ~SYM[1] : ram_array((~ARG[0]-1) downto 0) := (others => ~ARG[3]); -- ram
signal ~SYM[2] : ~TYP[8]; -- inp
signal ~SYM[3] : ~TYP[8] := ~ARG[3]; -- outp
begin
~SYM[2] <= ~ARG[8];
process(~CLKO)
begin
if rising_edge(~CLKO) then
if ~ARG[7] then
~SYM[1](to_integer(~ARG[5])) <= ~SYM[2];
end if;
~SYM[3] <= ~SYM[1](to_integer(~ARG[6]));
end if;
end process;
~RESULT <= ~SYM[3];
end block;"
}
}
, { "BlackBox" :
{ "name" : "CLaSH.Prelude.sassert"
, "templateD" :
"~SYM[0]_block : block
begin
-- pragma translate_off
process(~CLK[2],~RST[2],~ARG[2],~ARG[3]) is
begin
if (rising_edge(~CLK[2]) or rising_edge(~RST[2])) then
assert (~ARG[2] = ~ARG[3]) report (\"expected: \" & to_string (~ARG[3]) & \", actual: \" & to_string (~ARG[2])) severity error;
end if;
end process;
-- pragma translate_on
~RESULT <= ~ARG[4];
end block;"
}
}
]