这段程序是由系统生成的 好象是AHDL程序 无奈我看不懂有懂的大虾帮忙看一下。。。 另外请教一下这个模块是怎么生成的?
OPTIONS NAME_SUBSTITUTION = ON;
PARAMETERS ( LPM_WIDTH, LPM_CVALUE, CBXI_PARAMETER = "NOTHING" );
FUNCTION @CBXI_PARAMETER () RETURNS (result[LPM_WIDTH-1..0]);
SUBDESIGN lpm_constant ( result[LPM_WIDTH-1..0] : OUTPUT; ) VARIABLE IF CBXI_PARAMETER != "NOTHING" GENERATE ag : @CBXI_PARAMETER WITH (CBXI_PARAMETER = "NOTHING"); END GENERATE;
BEGIN
ASSERT (LPM_WIDTH > 0) REPORT "Value of LPM_WIDTH parameter value must be greater than 0" SEVERITY ERROR HELP_ID LPM_CONSTANT_WIDTH;
IF CBXI_PARAMETER == "NOTHING" GENERATE
FOR each_bit IN 0 TO LPM_WIDTH-1 GENERATE IF ((2^each_bit & LPM_CVALUE) == 0) GENERATE result[each_bit] = GND; ELSE GENERATE result[each_bit] = VCC; END GENERATE; END GENERATE; ELSE GENERATE IF USED(result) GENERATE result[] = ag.result[]; END GENERATE; END GENERATE; IF !USED(result) GENERATE result[] = GND; END GENERATE; END; |