.. -----------------------------------------------------------------------------
   ..
   ..  Filename       : index.rst
   ..  Author         : Huang Leilei
   ..  Status         : draft
   ..  Created        : 2026-03-03
   ..  Description    : about reference model
   ..
.. -----------------------------------------------------------------------------

About Reference Model
=====================

   |  Directory *reference_model* contains reference models.
   |  Those reference models should be created from the corresponding C model's regression run environments.

   For example, reference model *xkcalc* can be created from the regression run environment *runXkcalc* in *pj_example_c_model*.

   |  In WSL environment, change directory to *pj_example_c_model/script/run/runXkcalc*,
   |  then you can

*  create it with

   ::

      make create

   after which you will get

   .. +++++++++++++ uncommented to help the decision of width

   .. image:: create0.png
      :width: 1090

   \

   .. +++++++++++++ uncommented to help the decision of width

   .. image:: create1.png
      :width: 285


Existing Environments
---------------------

   Information on several existing reference models is listed below.

xkcalc
``````

*  Function

   #. |  generate test vectors according to the information specified by
      |  parameter *CSTR_INFO_VECT_ALL* (vector list), parameter *CSTR_DIR_VECT* (vector directory) and
      |  configuration file *xkcalc.cfg*

*  Dependency

      none

*  Content

      .. table::
         :align: left
         :widths: auto

         =============== ================================= ============
          item            description                       postscript
         =============== ================================= ============
          runXkcalca.sh   run script
          xkcalc          executable file
          xkcalc.cfg      configuration file
          dump            directory for generated vectors   generated by command *./runXkcalc.sh*
         =============== ================================= ============

*  Usage

      |  In WSL environment, change directory to *reference_model/xkcalc*,
      |  then you can

   #. try the above functions with

      ::

         ./runXkcalc.sh

      after which you will get

      .. +++++++++++++ uncommented to help the decision of width

      .. image:: xkcalc_usage0.png
         :width: 605

      \.\.\.

      .. +++++++++++++ uncommented to help the decision of width

      .. image:: xkcalc_usage1.png
         :width: 605

      \

      .. +++++++++++++ uncommented to help the decision of width

      .. image:: xkcalc_usage2.png
         :width: 990
