MOKA(1)
π MOKA β the model checker ancestor, but make it a vibe π
okay bestie, gather round, because this is moka from the CAO-VLSI Reference Manual (section 1 of the manual pages, if you're keeping track π), and she is literally a CTL model checker. yes. the whole thing. let's go π
β¨ ORIGIN β¨
so this software belongs to the ALLIANCE CAD SYSTEM, developed by the ASIM team at the LIP6 laboratory of UniversitΓ© Pierre et Marie CURIE, in Paris, France. π«π· iconic academic royalty, no cap.
- Web:
http://asim.lip6.fr/recherche/alliance/ - E-mail:
alliance-users@asim.lip6.fr
πΈ SYNOPSIS πΈ
moka [-VDB] fsm_filename ctl_filename
that's it. that's the whole summoning ritual. two files, three optional letters, go off queen π«Ά
π« DESCRIPTION π«
moka is a CTL model checker. periodt.
She's made to run on FSM or RTL descriptions, and she supports the same VHDL subset as syf or boom β for the deets on that subset, go peek at SYF(1), BOOM(1), FSM(5), VBE(5). π
But β and this is the part where I hold your hand β moka imposes that:
- each register of the behavioral description has the same clock condition
- there are no tristate or multiplexed buses
in particular, the VHDL types MUX_BIT and WOR_BIT aren't not supported (yes, that's how the original says it, and honestly? relatable, she said what she said π).
so here's the pipeline, step by step, main character energy only:
- First of all,
mokabuilds the function transition of the FSM using a Reduced Ordered Binary Decision Diagrams representation. π§ - Then she applies the initial conditions to find the first state (that's the
INITIALand/orRESET_CONDkeyword in theCTL(5)file format). - After that, she computes a symbolic simulation of the FSM to find all the reachable states. This computation takes into account the assumptions conditions (the
ASSUMEkeyword in theCTL(5)file format). - And finally,
mokaverifies one by one each CTL formula. (seeCTL(5)for the CTL file format details β¨)
π₯ CTL OPERATORS π₯
For each CTL sub-expression, moka will return the set of states that verifies the formula. For example, EX(p) will return the set of reachable states that verifies EX(p). she's thorough like that. π
the CTL operators, served fresh:
EX(p)β returns all states which have almost one primary state successor that verifiesp.EU(p,q)β returns all states that are the root of almost one path, such thatpis true untilqis always true.EG(p)β returns all states that are the root of almost one path, such thatpis always true.AX(p)β returns all states which have all their primary state successor that verifiesp.AU(p,q)β returns all states that are the root of only pathes from whichpis true untilqis always true.AG(p)β returns all states that are the root of only pathes, such thatpis always true.
(yes, "pathes." she's French, she's doing her best, we love her for it ππ)
π ENVIRONMENT VARIABLES π
MBK_WORK_LIBβ gives the path for the description and the CTL file. The default value is the current directory.MBK_CATA_LIBβ gives some auxiliary pathes for the descriptions and the CTL file. The default value is the current directory.
set them, bestie. don't make her hunt for your files π§
π OPTIONS π
-Vβ Sets verbose mode on. Each step of the model checking is displayed on the standard output.-Dβ Sets debug mode on. Each step of the model checking is detailed on the standard output. In particular, all states set are displayed for each CTL sub-expression.-Bβ The input file is a VHDL description using the Alliance VHDL subset (seeVBE(5)file format).
ngl -D is a lot of output. it's giving "she's telling you everything." you've been warned π
π¦ FSM EXAMPLE π¦
-- A multi fsm example
ENTITY example is
PORT
(
ck : in BIT;
data_in : in BIT;
reset : in BIT;
data_out : out BIT
);
END example;
ARCHITECTURE FSM OF example is
TYPE A_ETAT_TYPE IS (A_E0, A_E1);
SIGNAL A_NS, A_CS : A_ETAT_TYPE;
TYPE B_ETAT_TYPE IS (B_E0, B_E1);
SIGNAL B_NS, B_CS : B_ETAT_TYPE;
--PRAGMA CURRENT_STATE A_CS FSM_A
--PRAGMA NEXT_STATE A_NS FSM_A
--PRAGMA CLOCK ck FSM_A
--PRAGMA FIRST_STATE A_E0 FSM_A
--PRAGMA CURRENT_STATE B_CS FSM_B
--PRAGMA NEXT_STATE B_NS FSM_B
--PRAGMA CLOCK ck FSM_B
--PRAGMA FIRST_STATE B_E0 FSM_B
SIGNAL ACK, REQ, DATA_INT : BIT;
BEGIN
A_1 : PROCESS ( A_CS, ACK )
BEGIN
IF ( reset = '1' )
THEN A_NS <= A_E0;
DATA_OUT <= '0';
REQ <= '0';
ELSE
CASE A_CS is
WHEN A_E0 =>
IF ( ACK ='1') THEN A_NS <= A_E1;
ELSE A_NS <= A_E0;
END IF;
DATA_OUT <= '0';
REQ <= '1';
WHEN A_E1 =>
IF ( ACK ='1') THEN A_NS <= A_E1;
ELSE A_NS <= A_E0;
END IF;
DATA_OUT <= DATA_INT;
REQ <= '0';
END CASE;
END IF;
END PROCESS A_1;
A_2 : PROCESS( ck )
BEGIN
IF ( ck = '1' AND NOT ck'STABLE )
THEN A_CS <= A_NS;
END IF;
END PROCESS A_2;
-------
B_1 : PROCESS ( B_CS, ACK )
BEGIN
IF ( reset = '1' )
THEN B_NS <= B_E0;
DATA_INT <= '0';
ACK <= '0';
ELSE
CASE B_CS is
WHEN B_E0 =>
IF ( REQ ='1') THEN B_NS <= B_E1;
ELSE B_NS <= B_E0;
END IF;
DATA_INT <= '0';
ACK <= '0';
WHEN B_E1 =>
IF ( REQ ='1') THEN B_NS <= B_E1;
ELSE B_NS <= B_E0;
END IF;
DATA_INT <= DATA_IN;
ACK <= '1';
END CASE;
END IF;
END PROCESS B_1;
B_2 : PROCESS( ck )
BEGIN
IF ( ck = '1' AND NOT ck'STABLE )
THEN B_CS <= B_NS;
END IF;
END PROCESS B_2;
END FSM;
look at those --PRAGMA lines. that's how she knows which signal is the current state, which is the next state, which is the clock, and which is the first state. slay β¨
π CTL EXAMPLE π
-- A CTL file example
TYPE A_ETAT_TYPE IS (A_E0, A_E1);
TYPE B_ETAT_TYPE IS (B_E0, B_E1);
VARIABLE A_NS, A_CS : A_ETAT_TYPE;
VARIABLE B_NS, B_CS : B_ETAT_TYPE;
VARIABLE ck : BIT;
VARIABLE data_in : BIT;
VARIABLE data_out : BIT;
VARIABLE reset : BIT;
VARIABLE ack : BIT;
VARIABLE req : BIT;
RESET_COND init1 := (reset='1');
ASSUME ass1 := (reset='0');
begin
prop1 : EX( ack='1' );
prop2 : AG( req -> AF( ack ) );
prop4 : AU( req='1', ack='1');
end;
see RESET_COND and ASSUME in there? that's the initial conditions and the assumptions from the description up above. it all connects, iykyk π
β MOKA EXAMPLE β
moka -V example example
verbose mode, FSM file, CTL file. two examples because that's the name she was given. go bestie go π
π SEE ALSO π
syf (1), fsp (1), fsm (5), ctl (5), vbe(5).
π BUG REPORT π
This tool is under development at the ASIM department of the LIP6 laboratory.
We need your feedback to improve documentation and tools. π«Ά (fr fr, tell them things. they're asking nicely.)
and that's the whole page, bestie!! this was the MOKA(1) page from the ASIM/LIP6 crew, dated August 5, 2002 β a classic, an icon, a legend. now go model-check something and make her proud πβ¨πΈπ¦π
π
π¦ where this page comes from
- fedora 43: alliance 5.1.1-35.20160506gitd8c05cd.fc42 Β· GPL-2.0-only
- fedora 43: alliance 5.1.1-35.20160506gitd8c05cd.fc42 Β· GPL-2.0-only
- fedora 44: alliance 5.1.1-35.20160506gitd8c05cd.fc42 Β· GPL-2.0-only
- fedora 44: alliance 5.1.1-35.20160506gitd8c05cd.fc42 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms