Sample Sequential Machine Text Design File



TITLE "Double Loop Sequential Machine";
%---------------------------------------------------------------

File:			dblloop.tdf
Author:			Charles S. Tritt, Ph.D.
Last Updated:	2/12/97

This file specifies a Moore machine that has states in
two interlocking loops.  There are seven total states with
three in each loop (left and right) and one shared by both 
loops.  The seven states are designated: start, left0, left1, 
left2, right0, right1 and right2.  The machine has three
inputs: move, cw/ccw (clockwise, not counter-clockwise)
and goright (take right loop from start state).  It has
three outputs: left (machine is in one of the left loop 
states), c1 and c0 (c1 and c0 indicate the current state, in
binary, of the machine within the left or right loop).

---------------------------------------------------------------%
SUBDESIGN dblloop
(
	clock	:	INPUT;
	reset	:	INPUT;
	move	:	INPUT;
	cw/ccw	:	INPUT; % Clockwise, not counter-clockwise. %
	goright	:	INPUT; % Take the right loop from start. %
	left	:	OUTPUT; % Machine is in a left loop state. %
	c1		:	OUTPUT; % MSB of state number. %
	c0		:	OUTPUT; % LSB of state number. %
)

% Specify the machine states in the VARIABLE subsection. %

VARIABLE

  	dblloop: MACHINE WITH STATES ( start, left0, left1, left2,
		right0, right1, right2 );

BEGIN

% Specify the boolean control equations. % 

	dblloop.clk = clock;
	dblloop.reset = reset;

% Specify the machine operation in a state table. %

	TABLE dblloop, move, cw/ccw, goright => 
		left, c1, c0, dblloop; 

%   current		current		current		next 	%
%   state		inputs		outputs		state 	%

	start,		0, X, X	=>	0, 1, 1,	start;
	start,		1, 0, 0	=>	0, 1, 1,	left0;
	start,		1, 0, 1	=>	0, 1, 1,	right2;
	start,		1, 1, 0	=>	0, 1, 1,	left2;
	start,		1, 1, 1	=>	0, 1, 1,	right0;

	left0,		0, X, X	=>	1, 0, 0,	left0;
	left0,		1, 0, X	=>	1, 0, 0,	left1;
	left0,		1, 1, X	=>	1, 0, 0,	start;

	left1,		0, X, X	=>	1, 0, 1,	left1;
	left1,		1, 0, X	=>	1, 0, 1,	left2;
	left1,		1, 1, X	=>	1, 0, 1,	left0;

	left2,		0, X, X	=>	1, 1, 0,	left2;
	left2,		1, 0, X	=>	1, 1, 0,	start;
	left2,		1, 1, X	=>	1, 1, 0,	left1;

	right0,		0, X, X	=>	0, 0, 0,	right0;
	right0,		1, 0, X	=>	0, 0, 0,	start;
	right0,		1, 1, X	=>	0, 0, 0,	right1;

	right1,		0, X, X	=>	0, 0, 1,	right1;
	right1,		1, 0, X	=>	0, 0, 1,	right0;
	right1,		1, 1, X	=>	0, 0, 1,	right2;

	right2,		0, X, X	=>	0, 1, 0,	right2;
	right2,		1, 0, X	=>	0, 1, 0,	right1;
	right2,		1, 1, X	=>	0, 1, 0,	start;

	END TABLE;
END;

Send comments and suggestions about this page to: Dr. Charles S. Tritt
This page last updated 2/18/97