#NEWLINE# def mkLed( ) : #NEWLINE# #INDENT# m = Module ( 'blinkled' ) #NEWLINE# width = m . Parameter ( 'WIDTH' , 8 ) #NEWLINE# clk = m . Input ( 'CLK' ) #NEWLINE# rst = m . Input ( 'RST' ) #NEWLINE# led = m . OutputReg ( 'LED' , rst ) #NEWLINE# count = m . Reg ( 'count' , 32 ) #NEWLINE# m . Always ( Posedge ( clk ) ) ( If ( rst ) ( count ( 0 ) ) . Else ( If ( ( count == 1023 ) ) ( count ( 0 ) ) . Else ( count ( ( count + 1 ) ) ) ) ) #NEWLINE# m . Always ( Posedge ( clk ) ) ( If ( rst ) ( led ( 0 ) ) . Else ( If ( ( count == ( 1024 - 1 ) ) ) ( led ( IntX ( ) ) ) ) ) #NEWLINE# return m