/* * TCC - TRD Configuration Compiler * Author: Jan de Cuveland * Kirchhoff-Institut fuer Physik * Date: December 17, 2003 */ Hello TRAP group, To simplify the configuration of TRAP for both simulation and testing, I wrote a small tool which generates a chain of slow control commands from a configuration script file. The program can perform arithmetic operations, understand several number representations and handle constants and variables. The full set of configuration register names from the TRAP documentation is available as preloaded constants. These constants should be used instead of explicit address values whereever possible. As the asm_mimd assembler can be executed from within a configuration script, it is now possible to have only a single configuration source file for each simulation. The program is available on tieda as "tcc" (type "tcc --help" for more information). It is ment to replace "inc2dat" and any direct calls to "asm_mimd" or "m4". A migration script named "inc2tcs" (also available on tieda) tries to convert existing scsn data files to the new .tcs format used by tcc. Use it as "inc2tcs < rusty.inc > shiny.tcs". I will remove this script from tieda after some time. Regards, Jan. / * TrapCC * Extended by: Tom Dietel */ I made several updates to tcc over the last few years: I included some code that should determine proper locations of error messages (i.e. file/line instead of total number of lines read so far). However, this is mostly untested. Second, I renamed tcc to trapcc, to avoid a naming conflict with the tiny c compiler, which has lead to confusion several times. Last, I introduced the first two extended commands (command IDs >= 16) that are not part of the original tcc. So far, tracklet/LTU parameters can be set by trapcc (although some definitions are still pending) and the tests can be started. To extend the trapcc by more extended commands, the code has to be modified in three places: first the tokens that should be used have to be listed in parser.y on a %token line. Second, lexer.l has to be modified to generate the new tokens when the new commands are encountered, and third, the grammar in parser.y has to be modified to allow for the new tokens and to generate the correct output. - Tom Dietel.