关键部分: // *************************************************************** // // AB_DECODER.v Decoder for phase A and B encoder // // V1.00 2007-12-04 // // Design by lbxxx in shanghai, all right reserved // // ***************************************************************
// decode direct from phase A and B // always @(posedge DI_PHASE_A) DIRECT = DI_PHASE_B; always @(posedge DI_PHASE_B) DIRECT_PATCH = ~(DIRECT ^ DI_PHASE_A); assign DO_DIRECT = DIRECT | DIRECT_PATCH;
// decode pulse from phase A and B // always PULSE_DOUBLE = DI_PHASE_A ^ DI_PHASE_B;
always @(posedge DI_SYSCLK) begin
if(PULSE_DOUBLE != PULSE_DOUBLE_LAST) begin DO_PULSE = 1'b1; PULSE_DOUBLE_LAST = PULSE_DOUBLE; end else begin DO_PULSE = 1'b0; end
用户1637293 2010-4-12 11:52
用户242694 2010-4-1 00:15
用户1020461 2010-3-21 18:26
用户251346 2009-8-26 09:31
用户251346 2009-8-25 18:04
用户211511 2009-6-3 17:26