clash-ghc-0.3: primitives/clash.prelude.explicit.json
[ { "BlackBox" :
{ "name" : "CLaSH.Prelude.Explicit.cblockRam"
, "templateD" :
"~SYM[0]_block : block
type ram_array is array (natural range <>) of ~TYP[9];
signal ~SYM[1] : ram_array((~ARG[0]-1) downto 0) := (others => ~ARG[3]); -- ram
signal ~SYM[2] : ~TYP[9]; -- inp
signal ~SYM[3] : ~TYP[9] := ~ARG[3]; -- outp
begin
~SYM[2] <= ~ARG[9];
process(~CLKO)
begin
if rising_edge(~CLKO) then
if ~ARG[8] then
~SYM[1](to_integer(~ARG[6])) <= ~SYM[2];
end if;
~SYM[3] <= ~SYM[1](to_integer(~ARG[7]));
end if;
end process;
~RESULT <= ~SYM[3];
end block;"
}
}
, { "BlackBox" :
{ "name" : "CLaSH.Prelude.Explicit.csassert"
, "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;"
}
}
]