--a_graycounter DEVICE_FAMILY="Stratix III" PVALUE=0 WIDTH=4 clock cnt_en q ALTERA_INTERNAL_OPTIONS=suppress_da_rule_internal=S102 --VERSION_BEGIN 9.1SP2 cbx_a_gray2bin 2010:03:24:20:38:24:SJ cbx_a_graycounter 2010:03:24:20:38:24:SJ cbx_cycloneii 2010:03:24:20:38:24:SJ cbx_mgl 2010:03:24:21:00:10:SJ cbx_stratix 2010:03:24:20:38:24:SJ cbx_stratixii 2010:03:24:20:38:24:SJ VERSION_END -- Copyright (C) 1991-2010 Altera Corporation -- Your use of Altera Corporation's design tools, logic functions -- and other software and tools, and its AMPP partner logic -- functions, and any output files from any of the foregoing -- (including device programming or simulation files), and any -- associated documentation or information are expressly subject -- to the terms and conditions of the Altera Program License -- Subscription Agreement, Altera MegaCore Function License -- Agreement, or other applicable license agreement, including, -- without limitation, that your use is for the sole purpose of -- programming logic devices manufactured by Altera and sold by -- Altera or its authorized distributors. Please refer to the -- applicable agreement for further details. --synthesis_resources = reg 5 OPTIONS ALTERA_INTERNAL_OPTION = "suppress_da_rule_internal=S102;{-to parity9} POWER_UP_LEVEL=HIGH"; SUBDESIGN a_graycounter_a5c ( clock : input; cnt_en : input; q[3..0] : output; ) VARIABLE counter10a[3..0] : dffeas; parity9 : dffeas WITH ( power_up = "high" ); cntr_cout[3..0] : WIRE; parity_cout : WIRE; sclr : NODE; updown : NODE; BEGIN counter10a[].clk = clock; counter10a[].d = ( (counter10a[3].q $ cntr_cout[2..2]), (counter10a[2].q $ (counter10a[1].q & cntr_cout[1..1])), (counter10a[1].q $ (counter10a[0].q & cntr_cout[0..0])), ((cnt_en & (counter10a[0].q $ (! parity_cout))) # ((! cnt_en) & counter10a[0].q))); counter10a[].sclr = sclr; parity9.clk = clock; parity9.d = ((cnt_en & (((counter10a[0..0].q $ counter10a[1..1].q) $ counter10a[2..2].q) $ counter10a[3..3].q)) # ((! cnt_en) & parity9.q)); parity9.sclr = sclr; cntr_cout[] = ( B"0", (cntr_cout[1..1] & (! counter10a[1].q)), (cntr_cout[0..0] & (! counter10a[0].q)), (cnt_en & parity_cout)); parity_cout = (((! parity9.q) $ (! updown)) & cnt_en); q[] = counter10a[].q; sclr = GND; updown = VCC; END; --VALID FILE