/****************************************************/
/* File: code.h */
/* Code emitting utilities for the TINY compiler */
/* and interface to the TM machi
#include "globals.h"
#include "code.h"
/* Procedure emitComment prints a comment line
* with comment c in the code file
*/
void emitComment( char * c )
{ if (TraceCode) fprintf(code
function [a,b]=code(job_total,pop_size)
for m=1:pop_size
for k=1:job_total*(ceil(log2(job_total))+1)
a(m,k)=rand*2-1;
b(m,k)=sqrt(1-a(m,k)^2)*sign(randn);
end
end
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
--*****************************************************
ENTITY CODE IS
PORT(
clk,user_admin,clear,enter,chgcode