DMI – Graduate Course in Computer Science
Copyleft
2018 Giuseppe Scollo
outline:
programmer’s model = control design + data design
the programmer’s model, that is the software view of a hardware module, includes:
a few considerations follow about the impact that these two kinds of design decisions have on the design of the software driver of the custom hardware module
the address map reflects the organization of software-readable and software-writable storage elements of the hardware module; its design should consider the viewpoint of the software designer rather than the hardware designer, thus:
the design of a good instruction set is a hard problem, that requires the codesigner to make a proper trade-off between flexibility and efficiency
here are a few generic design guidelines:
a recent lab tutorial presented a software implementation of the delay computation of a Collatz trajectory with given start point
hardware implementations of the same function were the subject of previous lab experiences
the performance measurements carried out on the software implementation show that it consumes almost all of the program execution time
a first alternative to evaluate: to integrate the hardware function as a custom instruction or as a memory-mapped coprocessor?
other design decisions depend on this first decision, as follows
the VHDL description of the circuit which computes the function is to be embedded into a component equipped with Avalon interfaces for the Clock, Reset, and Avalon MM Slave signals, so as to receive the initial data by a write operation and to return the result by a reply to a read operation
addressing of the coprocessor: since the (initial data) write and (final result) read operations take place at different times and have the same data size, a single address suffices
software driver : two macros and a function may be defined for the bus access software interface: DC_RESET(d), DC_START(d,x0), unsigned int delay(d), where d is the address assigned to the coprocessor
recommended readings:
for further consultation: