Overview

SMOK provides 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 using SMOK than 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 -- the SMOK infrastructure 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 UserDefinedComponentsExamples directory of the standard installation (so, normally in C:\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 a DLL containing the methods that implement one or more user defined component types. (The example Visual Studio projects are set up to create the DLL - you do not need to know anything about DLL's to use them. If you use a different compiler, you will need to use your compiler's facilities to create a DLL that exports exactly one procedure.) Once you have created a package, SMOK users can create and manipulate components of the types you have defined just as they do the SMOK built-in component types.