16.01.2013 Views

Project One Report

Project One Report

Project One Report

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ECE 406: <strong>Project</strong> <strong>One</strong> <strong>Report</strong> Barwick<br />

Each of these modules were outlined with specific requirements. Once these<br />

requirements were defined, they were implemented as well as tested individually.<br />

For example, the Controller block, which keeps track of the different states of the<br />

system, was first outlined using a state diagram and then implemented in Verilog<br />

using a case statement and register.<br />

III. TESTING AND DEBUGGING<br />

Perhaps the most difficult part of this project was testing and debugging.<br />

After each module was designed, a test bench was written for that module to<br />

determine if the module met the requirements detailed in the design process.<br />

Testing each individual module first rather than waiting to test the entire system<br />

proved to be extremely helpful. It caught obvious bugs and prevented me from<br />

feeling overwhelmed. However, it turned out that testing the modules individually<br />

does not guarantee that the over system will function properly. Once the modules<br />

were connected together, there were several issues some of which have been outlined<br />

below.<br />

a. Improper connections<br />

When the microprocessor was first compiled, several errors were received<br />

stemming from the top level module. The specific error was:<br />

ncelab: *W,CUVMPW (./proj1.v,30|74): port sizes differ<br />

in port connection.<br />

The error resulted from not explicitly stating multiple wire labels that<br />

connect each module. If a single wire connects the modules, such as the “clock”,<br />

it does not need to be defined as a wire. However, if it is multiple wires, such as<br />

“D_Data”, the label needs to be defined (ex. “wire [47:0] D_Data;”). I defined<br />

the wires needed wires explicitly and the program complied without error.<br />

b. Bad Fetch Module<br />

After the system successfully compiled, the anomalous behavior shown in<br />

figure two was observed. The system did not seem to be getting the proper<br />

memory address, which is determined by the fetch module. The schematic for<br />

the fetch module was reevaluated and it was determined that the “pc” signal was<br />

not being set properly. During certain states the “pc” signal from the fetch<br />

module needed to be high impedance due to a shared bus. A simple change in the<br />

code within the fetch module fixed this. This obvious bug should have been<br />

caught during the individual module testing and may have gotten through due to<br />

poor testing.<br />

Page | 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!