aboutsummaryrefslogtreecommitdiffstats
path: root/tests/realmath/generate.py
Commit message (Expand)AuthorAgeFilesLines
* Add optional SEED=n command line option to Makefile, and -S n command line op...Eric Smith2016-09-221-1/+11
* Switched to Python 3Clifford Wolf2015-08-221-4/+1
* Fixed trailing whitespacesClifford Wolf2015-07-021-2/+2
* changed file() to open() in python scriptsClifford Wolf2015-05-111-3/+3
* fix for python 2.6.6Clifford Wolf2015-03-201-48/+51
* Little steps in realmath test benchClifford Wolf2014-06-211-2/+2
* Improved handling of relational op of real valuesClifford Wolf2014-06-171-4/+8
* Little steps in realmath test benchClifford Wolf2014-06-161-0/+2
* Improved realmath test benchClifford Wolf2014-06-151-4/+12
* improved realmath test benchClifford Wolf2014-06-141-1/+4
* progress in realmath test benchClifford Wolf2014-06-141-4/+26
* added first draft of real math testcase generatorClifford Wolf2014-06-141-0/+52
ht .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
module top(...);
	parameter LUT_WIDTH = 4; // Multiples of 2 only
	input [LUT_WIDTH-1:0] a;

	output o1_1 = {(LUT_WIDTH/2){2'b10}} <= a;
	output o1_2 = {(LUT_WIDTH/2){2'b10}} <  a;
	output o1_3 = {(LUT_WIDTH/2){2'b10}} >= a;
	output o1_4 = {(LUT_WIDTH/2){2'b10}} >  a;
	output o1_5 = {(LUT_WIDTH/2){2'b10}} == a;
	output o1_6 = {(LUT_WIDTH/2){2'b10}} != a;

	output o2_1 = a <= {(LUT_WIDTH/2){2'b10}};
	output o2_2 = a <  {(LUT_WIDTH/2){2'b10}};
	output o2_3 = a >= {(LUT_WIDTH/2){2'b10}};
	output o2_4 = a >  {(LUT_WIDTH/2){2'b10}};
	output o2_5 = a == {(LUT_WIDTH/2){2'b10}};
	output o2_6 = a != {(LUT_WIDTH/2){2'b10}};

	output o3_1 = {(LUT_WIDTH/2){2'sb01}} <= $signed(a);
	output o3_2 = {(LUT_WIDTH/2){2'sb01}} <  $signed(a);
	output o3_3 = {(LUT_WIDTH/2){2'sb01}} >= $signed(a);
	output o3_4 = {(LUT_WIDTH/2){2'sb01}} >  $signed(a);
	output o3_5 = {(LUT_WIDTH/2){2'sb01}} == $signed(a);
	output o3_6 = {(LUT_WIDTH/2){2'sb01}} != $signed(a);

	output o4_1 = $signed(a) <= {LUT_WIDTH{1'sb0}};
	output o4_2 = $signed(a) <  {LUT_WIDTH{1'sb0}};
	output o4_3 = $signed(a) >= {LUT_WIDTH{1'sb0}};
	output o4_4 = $signed(a) >  {LUT_WIDTH{1'sb0}};
endmodule