0% found this document useful (0 votes)
9 views3 pages

Main Program

The document provides basic control flow charts for the CT800 software, detailing the structure and purpose of various modules including the Chess Application Layer, HMI Layer, Library Layer, and Driver Layer. It highlights the single-threaded nature of the software and the interaction between the timer interrupt and keypad input. Additionally, it outlines the functions of each module and their respective prefixes.

Uploaded by

dhruwin2008
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Main Program

The document provides basic control flow charts for the CT800 software, detailing the structure and purpose of various modules including the Chess Application Layer, HMI Layer, Library Layer, and Driver Layer. It highlights the single-threaded nature of the software and the interaction between the timer interrupt and keypad input. Additionally, it outlines the functions of each module and their respective prefixes.

Uploaded by

dhruwin2008
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd

Basic flow charts for the CT800

The following pages contain some basic control flow charts in a simplified version, just for
getting some orientation:

- What each source text file contains


- How the overall control flow works
- How a response move is calculated (main flow in bold lines)

Time keeping, hash tables, menu logic and HMI are not shown in this overview. The menu
logic is simple enough anyway because the tree structure of the menu is directly reflected
in the call tree of the menu logic.

Note that this software is single-threaded; the only thing in parallel is the timer interrupt on
the target platform, which also handles the keypad input. Usually, this does not interfere
with the regular control flow, with one notable exception:

If the computer is calculating and the "GO!"-key is pressed, the keypad evaluation routine
will set up the "time is up" flag for the ongoing computation, simulating a time-over
condition.

Rasmus Althoff, November 2021


Overall Software Architecture

Chess Application Layer


module func. prefix purpose
play Play_ main(), overall game handling, move entering, menu
access
search Search_ search tree including quiescence
move_gen Mvgen_ move generator, in-check info
eval Eval_ static position evaluation
book Book_ opening book
hashtables Hash_ hashtable handling
kpk Kpk_ king+pawn vs. king endgame table
timekeeping Time_ time controls implementation

HMI Layer (Human-Machine Interface)


module func. prefix purpose
hmi Hmi_ dialogue system, game screen display, notation and
position viewer
menu Menu_ menu system
posedit Pos_ position editor

Library Layer
module func. prefix purpose
util Util_ various library utility functions
ctdefs - project-wide definitions of constants and data types
confdefs - definition of the configuration options and macros
Driver Layer
module func. prefix purpose
boot_stm32f405 - startup code, interrupt tables, RAM-test (ARM only)
hardware_arm Hw_ high level hardware interface (ARM only)
hardware_arm Hw_Disp_ display driver (ARM only)
_disp
hardware_arm Hw_Keybd_ keypad driver (ARM only)
_keybd
hardware_arm Hw_Sig_ LED and beeper driver (ARM only)
_signal
arm_driver Drv_ low level CPU hardware interface (ARM only)
hardware_pc Hw_ replacement for hardware_arm (PC only)

You might also like