This preview shows page 1-2-3-4-5-6-7-51-52-53-54-55-56-57-58-103-104-105-106-107-108-109 out of 109 pages.
All Sourcecode.pdfNathan Source.pdfAD670_controller.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/AD670_controller.txtAD670_controller_TB.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/AD670_controller_TB.txtAD670_datareg.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/AD670_datareg.txtAD670_datareg_TB.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/AD670_datareg_TB.txtFSM_FIR.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/FSM_FIR.txtFSM_FIR_TB.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/FSM_FIR_TB.txtFSM_Integrator_Accel.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/FSM_Integrator_Accel.txtFSM_Integrator_Accel_TB.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/FSM_Integrator_Accel_TB.txtIntegrator_Accel.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/Integrator_Accel.txtIntegrator_Accel_FSM.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/Integrator_Accel_FSM.txtIntegrator_Accel_TB.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/Integrator_Accel_TB.txtIntegrator_Position.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/Integrator_Position.txtIntegrator_Position_TB.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/Integrator_Position_TB.txtShaun Source.pdfcharblock_tb.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/charblock_tb.txtdmem.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/dmem.txtdrawshape_tb.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/drawshape_tb.txtdrawutil.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/drawutil.txtmint.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/mint.txtoverlay.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/overlay.txtoverlay_tb.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/overlay_tb.txtovmem.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/ovmem.txtpulseinvert_tb.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/pulseinvert_tb.txtshapes.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/shapes.txtsync.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/sync.txtsync_tb.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/sync_tb.txtwb_test.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/wb_test.txtwbcontroller.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/wbcontroller.txtwbdisp.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/wbdisp.txtwbdisp_tb.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/wbdisp_tb.txtlab4_labkit.txtLocal Diskfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/fpi/lab4_labkit.txtdatareg_tb.bmpFSM_FIR_tb.bmpFSM_Integrator_Accel_TB.bmpIntegrator_Accel_TB.bmppulseinver_tb.bmpsync_tb.bmpwbdisp_tb.bmpfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/AD670_controller.txtmodule AD670_controller(clk, status, dataavail, r_w_bar, state, reset, count, enable);input clk;input reset;input status;output dataavail, r_w_bar, enable;output [3:0] state;output [14:0] count;//internal statereg [3:0] state;reg [3:0] nextstate;reg status_d1, status_d2;reg dataavail, r_w_bar, r_w_bar_int;//Timing signal count registersreg [14:0] count;reg [3:0] r_w_bar_waitcount;reg [3:0] read_delaycount;//Timing signal enable registersreg enable;reg r_w_bar_waitenable;reg read_delayenable;//State Declarationsparameter IDLE = 0;parameter CONV0 = 1;parameter CONV1 = 2;parameter CONV2 = 3;parameter WAITSTATUS0 = 4;parameter WAITSTATUS1 = 5;parameter READDELAY0 = 6;parameter READDELAY1 = 7;parameter READCYCLE = 8;// Max Count for sampling time parameter MAX_COUNT = 12'd3150;always @(posedge clk) // this generates a delay so we only sample 10,000 times/sec begin if(reset) begin count <= 0; enable <= 0; endfile:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/AD670_controller.txt (1 of 4)5/18/2006 8:49:15 PMPage 1 of 102file:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/AD670_controller.txt else begin count <= 1 + count; if (count == MAX_COUNT) begin enable <= 1; count <= 0; end else enable <= 0; end endalways @(posedge clk) //this is a counter for a wait delay for the rwbar signal begin if(reset) r_w_bar_waitcount <= 0; else if(r_w_bar_waitenable) r_w_bar_waitcount <= 1 + r_w_bar_waitcount; else r_w_bar_waitcount <= 0; endalways @(posedge clk) //this is a counter for the read wait delay begin if(reset) read_delaycount <= 0; else if(read_delayenable) read_delaycount <= 1 + read_delaycount; else read_delaycount <= 0; end always @(posedge clk) // this is for next state assignment begin if(reset)file:///C|/Documents%20and%20Settings/Nathan%20Davis/Desktop/DigitalWhiteboard/AD670_controller.txt (2 of 4)5/18/2006
View Full Document