This paper describes the use of metaprogramming in Prolog to construct digital logic-simulators which adapt themselves for efficiency to the structure of the circuits they simulate. To test the utility of the metaprogramming approach to simulation, in a simple but representative domain, a logic-simulator was written for TTL integrated circuits. The simulator accepts a wiring-list, from which it creates, loads, and executes a Prolog rule which is both (a) a representation of the user's circuit at the level of gates, adders, counters, etc., and (b) a procedure for its simulation. This rule, which expresses the structure of the circuit by means of Clocksin's definitional format, is an example of "executable data"; there is no distinction in Prolog, that is, between executable code and data. The ordering of goals in this rule guarantees that signals are traced through the circuit with no backtracking; thus the time to execute a simulation-cycle is minimized.


    Access

    Check access

    Check availability in my library

    Order at Subito €


    Export, share and cite



    Title :

    Metaprogramming in digital simulation


    Contributors:
    Eicher, J.W. (author) / Brown, F.M. (author)


    Publication date :

    1995-01-01


    Size :

    423209 byte





    Type of media :

    Conference paper


    Type of material :

    Electronic Resource


    Language :

    English



    Metaprogramming in Digital Simulation

    Eicher, J. W. / Brown, F. M. / IEEE et al. | British Library Conference Proceedings | 1995


    Research on Hardware Design Patterns Based on Metaprogramming Techniques

    Zhihai, S. / Jizhong, Z. / Qing, L. | British Library Online Contents | 2006



    Digital Sensor Simulation

    M. B. Faintich | NTIS | 1976


    Digital simulation of traffic

    Glickstein, A. | Engineering Index Backfile | 1963