26.
26
HDLによるRTL設計
if clk'event and clk = '1' then
case (s) is
when S0 =>
a <= 1;
s <= S1;
When S1 =>
b <= 2;
s <= S2;
When S2 =>
c <= a + b;
s <= S3;
end case;
end if;
a = 1;
b = 2;
c = a + b;
43.
43
OpenJDKすてき!!
/** Generate code and emit a class file for a given class
* @param env The attribution environment of the outermost class
* containing this class.
* @param cdef The class definition from which code is generated.
*/
JavaFileObject genCode(Env<AttrContext> env, JCClassDecl cdef) throws IOException {
synthesijer.jcfrontend.Main.newModule(env, cdef); // add hook for synthesijer
try {
if (gen.genClass(env, cdef) && (errorCount() == 0))
return writer.writeClass(cdef.sym);
} catch (ClassWriter.PoolOverflow ex) {
log.error(cdef.pos(), "limit.pool");
} catch (ClassWriter.StringOverflow ex) {
log.error(cdef.pos(), "limit.string.overflow",
ex.value.substring(0, 20));
} catch (CompletionFailure ex) {
chk.completionError(cdef.pos(), ex);
}
return null;
}
JavaCompiler.javaの中身
Be the first to comment