SMOKprovides an extension mechanism that allows users to create new component types. The original motivation this facility was to allow more complicated machines to be built as part of a course project usingSMOKthan would be practical if construction were limited to logic. For instance, students might build a cache controller or a TLB as a single component that would be integrated into a CPU datapath. The complexity of the cache controller or TLB would be expressed in software, rather than in or gates and PLA's.
SMOK"user defined component types" are implemented in software, in particular C++. No familiarity with Windows programming is required -- theSMOKinfrastructure handles almost all of the work. You simply write methods that are invoked on clock up and clock down each cycle. Your methods compute the component's outputs as a function of its inputs (on clock up), and latch values (if you choose) on clock down.Example user defined component implementations are provided in the
UserDefinedComponentsExamplesdirectory of the standard installation (so, normally inC:\Program Files\University of Washington CSE\SMOK\UserDefinedComponentExamples). Visual Studio 6 and Visual Studio .Net projects are provided. The interface has been designed to make use of other compilers as simple as possible.A
SMOK"package" is aDLLcontaining the methods that implement one or more user defined component types. (The example Visual Studio projects are set up to create theDLL- you do not need to know anything aboutDLL's to use them. If you use a different compiler, you will need to use your compiler's facilities to create aDLLthat exports exactly one procedure.) Once you have created a package,SMOKusers can create and manipulate components of the types you have defined just as they do theSMOKbuilt-in component types.