/******************************************************** * SRIP用レジスタ・ファイル用モジュール * * 以下のファイルを参考に作成 * * FDDPのソースに含まれる c.sfl * ********************************************************/ module reg_file { input a_adrs<5> ; input b_adrs<5> ; input w_adrs<5> ; input w_data<32> ; output a<32> ; output b<32> ; instrin do ; /* reg file0<32> ; /* R0 は常に0 */*/ reg file1<32> ; reg file2<32> ; reg file3<32> ; reg file4<32> ; reg file5<32> ; reg file6<32> ; reg file7<32> ; reg file8<32> ; reg file9<32> ; reg file10<32> ; reg file11<32> ; reg file12<32> ; reg file13<32> ; reg file14<32> ; reg file15<32> ; reg file16<32> ; reg file17<32> ; reg file18<32> ; reg file19<32> ; reg file20<32> ; reg file21<32> ; reg file22<32> ; reg file23<32> ; reg file24<32> ; reg file25<32> ; reg file26<32> ; reg file27<32> ; reg file28<32> ; reg file29<32> ; reg file30<32> ; reg file31<32> ; instruct do par { alt { a_adrs<4>& a_adrs<3>& a_adrs<2>& a_adrs<1>& a_adrs<0> : a = file31 ; a_adrs<4>& a_adrs<3>& a_adrs<2>& a_adrs<1>&^a_adrs<0> : a = file30 ; a_adrs<4>& a_adrs<3>& a_adrs<2>&^a_adrs<1>& a_adrs<0> : a = file29 ; a_adrs<4>& a_adrs<3>& a_adrs<2>&^a_adrs<1>&^a_adrs<0> : a = file28 ; a_adrs<4>& a_adrs<3>&^a_adrs<2>& a_adrs<1>& a_adrs<0> : a = file27 ; a_adrs<4>& a_adrs<3>&^a_adrs<2>& a_adrs<1>&^a_adrs<0> : a = file26 ; a_adrs<4>& a_adrs<3>&^a_adrs<2>&^a_adrs<1>& a_adrs<0> : a = file25 ; a_adrs<4>& a_adrs<3>&^a_adrs<2>&^a_adrs<1>&^a_adrs<0> : a = file24 ; a_adrs<4>&^a_adrs<3>& a_adrs<2>& a_adrs<1>& a_adrs<0> : a = file23 ; a_adrs<4>&^a_adrs<3>& a_adrs<2>& a_adrs<1>&^a_adrs<0> : a = file22 ; a_adrs<4>&^a_adrs<3>& a_adrs<2>&^a_adrs<1>& a_adrs<0> : a = file21 ; a_adrs<4>&^a_adrs<3>& a_adrs<2>&^a_adrs<1>&^a_adrs<0> : a = file20 ; a_adrs<4>&^a_adrs<3>&^a_adrs<2>& a_adrs<1>& a_adrs<0> : a = file19 ; a_adrs<4>&^a_adrs<3>&^a_adrs<2>& a_adrs<1>&^a_adrs<0> : a = file18 ; a_adrs<4>&^a_adrs<3>&^a_adrs<2>&^a_adrs<1>& a_adrs<0> : a = file17 ; a_adrs<4>&^a_adrs<3>&^a_adrs<2>&^a_adrs<1>&^a_adrs<0> : a = file16 ; ^a_adrs<4>& a_adrs<3>& a_adrs<2>& a_adrs<1>& a_adrs<0> : a = file15 ; ^a_adrs<4>& a_adrs<3>& a_adrs<2>& a_adrs<1>&^a_adrs<0> : a = file14 ; ^a_adrs<4>& a_adrs<3>& a_adrs<2>&^a_adrs<1>& a_adrs<0> : a = file13 ; ^a_adrs<4>& a_adrs<3>& a_adrs<2>&^a_adrs<1>&^a_adrs<0> : a = file12 ; ^a_adrs<4>& a_adrs<3>&^a_adrs<2>& a_adrs<1>& a_adrs<0> : a = file11 ; ^a_adrs<4>& a_adrs<3>&^a_adrs<2>& a_adrs<1>&^a_adrs<0> : a = file10 ; ^a_adrs<4>& a_adrs<3>&^a_adrs<2>&^a_adrs<1>& a_adrs<0> : a = file9 ; ^a_adrs<4>& a_adrs<3>&^a_adrs<2>&^a_adrs<1>&^a_adrs<0> : a = file8 ; ^a_adrs<4>&^a_adrs<3>& a_adrs<2>& a_adrs<1>& a_adrs<0> : a = file7 ; ^a_adrs<4>&^a_adrs<3>& a_adrs<2>& a_adrs<1>&^a_adrs<0> : a = file6 ; ^a_adrs<4>&^a_adrs<3>& a_adrs<2>&^a_adrs<1>& a_adrs<0> : a = file5 ; ^a_adrs<4>&^a_adrs<3>& a_adrs<2>&^a_adrs<1>&^a_adrs<0> : a = file4 ; ^a_adrs<4>&^a_adrs<3>&^a_adrs<2>& a_adrs<1>& a_adrs<0> : a = file3 ; ^a_adrs<4>&^a_adrs<3>&^a_adrs<2>& a_adrs<1>&^a_adrs<0> : a = file2 ; ^a_adrs<4>&^a_adrs<3>&^a_adrs<2>&^a_adrs<1>& a_adrs<0> : a = file1 ; else : a = 0x00000000 ; } alt { b_adrs<4>& b_adrs<3>& b_adrs<2>& b_adrs<1>& b_adrs<0> : b = file31 ; b_adrs<4>& b_adrs<3>& b_adrs<2>& b_adrs<1>&^b_adrs<0> : b = file30 ; b_adrs<4>& b_adrs<3>& b_adrs<2>&^b_adrs<1>& b_adrs<0> : b = file29 ; b_adrs<4>& b_adrs<3>& b_adrs<2>&^b_adrs<1>&^b_adrs<0> : b = file28 ; b_adrs<4>& b_adrs<3>&^b_adrs<2>& b_adrs<1>& b_adrs<0> : b = file27 ; b_adrs<4>& b_adrs<3>&^b_adrs<2>& b_adrs<1>&^b_adrs<0> : b = file26 ; b_adrs<4>& b_adrs<3>&^b_adrs<2>&^b_adrs<1>& b_adrs<0> : b = file25 ; b_adrs<4>& b_adrs<3>&^b_adrs<2>&^b_adrs<1>&^b_adrs<0> : b = file24 ; b_adrs<4>&^b_adrs<3>& b_adrs<2>& b_adrs<1>& b_adrs<0> : b = file23 ; b_adrs<4>&^b_adrs<3>& b_adrs<2>& b_adrs<1>&^b_adrs<0> : b = file22 ; b_adrs<4>&^b_adrs<3>& b_adrs<2>&^b_adrs<1>& b_adrs<0> : b = file21 ; b_adrs<4>&^b_adrs<3>& b_adrs<2>&^b_adrs<1>&^b_adrs<0> : b = file20 ; b_adrs<4>&^b_adrs<3>&^b_adrs<2>& b_adrs<1>& b_adrs<0> : b = file19 ; b_adrs<4>&^b_adrs<3>&^b_adrs<2>& b_adrs<1>&^b_adrs<0> : b = file18 ; b_adrs<4>&^b_adrs<3>&^b_adrs<2>&^b_adrs<1>& b_adrs<0> : b = file17 ; b_adrs<4>&^b_adrs<3>&^b_adrs<2>&^b_adrs<1>&^b_adrs<0> : b = file16 ; ^b_adrs<4>& b_adrs<3>& b_adrs<2>& b_adrs<1>& b_adrs<0> : b = file15 ; ^b_adrs<4>& b_adrs<3>& b_adrs<2>& b_adrs<1>&^b_adrs<0> : b = file14 ; ^b_adrs<4>& b_adrs<3>& b_adrs<2>&^b_adrs<1>& b_adrs<0> : b = file13 ; ^b_adrs<4>& b_adrs<3>& b_adrs<2>&^b_adrs<1>&^b_adrs<0> : b = file12 ; ^b_adrs<4>& b_adrs<3>&^b_adrs<2>& b_adrs<1>& b_adrs<0> : b = file11 ; ^b_adrs<4>& b_adrs<3>&^b_adrs<2>& b_adrs<1>&^b_adrs<0> : b = file10 ; ^b_adrs<4>& b_adrs<3>&^b_adrs<2>&^b_adrs<1>& b_adrs<0> : b = file9 ; ^b_adrs<4>& b_adrs<3>&^b_adrs<2>&^b_adrs<1>&^b_adrs<0> : b = file8 ; ^b_adrs<4>&^b_adrs<3>& b_adrs<2>& b_adrs<1>& b_adrs<0> : b = file7 ; ^b_adrs<4>&^b_adrs<3>& b_adrs<2>& b_adrs<1>&^b_adrs<0> : b = file6 ; ^b_adrs<4>&^b_adrs<3>& b_adrs<2>&^b_adrs<1>& b_adrs<0> : b = file5 ; ^b_adrs<4>&^b_adrs<3>& b_adrs<2>&^b_adrs<1>&^b_adrs<0> : b = file4 ; ^b_adrs<4>&^b_adrs<3>&^b_adrs<2>& b_adrs<1>& b_adrs<0> : b = file3 ; ^b_adrs<4>&^b_adrs<3>&^b_adrs<2>& b_adrs<1>&^b_adrs<0> : b = file2 ; ^b_adrs<4>&^b_adrs<3>&^b_adrs<2>&^b_adrs<1>& b_adrs<0> : b = file1 ; else : b = 0x00000000 ; } any { /* /|w_adrs : cell[w_adrs] := w_data ;*/ w_adrs<4>& w_adrs<3>& w_adrs<2>& w_adrs<1>& w_adrs<0> : file31 := w_data ; w_adrs<4>& w_adrs<3>& w_adrs<2>& w_adrs<1>&^w_adrs<0> : file30 := w_data ; w_adrs<4>& w_adrs<3>& w_adrs<2>&^w_adrs<1>& w_adrs<0> : file29 := w_data ; w_adrs<4>& w_adrs<3>& w_adrs<2>&^w_adrs<1>&^w_adrs<0> : file28 := w_data ; w_adrs<4>& w_adrs<3>&^w_adrs<2>& w_adrs<1>& w_adrs<0> : file27 := w_data ; w_adrs<4>& w_adrs<3>&^w_adrs<2>& w_adrs<1>&^w_adrs<0> : file26 := w_data ; w_adrs<4>& w_adrs<3>&^w_adrs<2>&^w_adrs<1>& w_adrs<0> : file25 := w_data ; w_adrs<4>& w_adrs<3>&^w_adrs<2>&^w_adrs<1>&^w_adrs<0> : file24 := w_data ; w_adrs<4>&^w_adrs<3>& w_adrs<2>& w_adrs<1>& w_adrs<0> : file23 := w_data ; w_adrs<4>&^w_adrs<3>& w_adrs<2>& w_adrs<1>&^w_adrs<0> : file22 := w_data ; w_adrs<4>&^w_adrs<3>& w_adrs<2>&^w_adrs<1>& w_adrs<0> : file21 := w_data ; w_adrs<4>&^w_adrs<3>& w_adrs<2>&^w_adrs<1>&^w_adrs<0> : file20 := w_data ; w_adrs<4>&^w_adrs<3>&^w_adrs<2>& w_adrs<1>& w_adrs<0> : file19 := w_data ; w_adrs<4>&^w_adrs<3>&^w_adrs<2>& w_adrs<1>&^w_adrs<0> : file18 := w_data ; w_adrs<4>&^w_adrs<3>&^w_adrs<2>&^w_adrs<1>& w_adrs<0> : file17 := w_data ; w_adrs<4>&^w_adrs<3>&^w_adrs<2>&^w_adrs<1>&^w_adrs<0> : file16 := w_data ; ^w_adrs<4>& w_adrs<3>& w_adrs<2>& w_adrs<1>& w_adrs<0> : file15 := w_data ; ^w_adrs<4>& w_adrs<3>& w_adrs<2>& w_adrs<1>&^w_adrs<0> : file14 := w_data ; ^w_adrs<4>& w_adrs<3>& w_adrs<2>&^w_adrs<1>& w_adrs<0> : file13 := w_data ; ^w_adrs<4>& w_adrs<3>& w_adrs<2>&^w_adrs<1>&^w_adrs<0> : file12 := w_data ; ^w_adrs<4>& w_adrs<3>&^w_adrs<2>& w_adrs<1>& w_adrs<0> : file11 := w_data ; ^w_adrs<4>& w_adrs<3>&^w_adrs<2>& w_adrs<1>&^w_adrs<0> : file10 := w_data ; ^w_adrs<4>& w_adrs<3>&^w_adrs<2>&^w_adrs<1>& w_adrs<0> : file9 := w_data ; ^w_adrs<4>& w_adrs<3>&^w_adrs<2>&^w_adrs<1>&^w_adrs<0> : file8 := w_data ; ^w_adrs<4>&^w_adrs<3>& w_adrs<2>& w_adrs<1>& w_adrs<0> : file7 := w_data ; ^w_adrs<4>&^w_adrs<3>& w_adrs<2>& w_adrs<1>&^w_adrs<0> : file6 := w_data ; ^w_adrs<4>&^w_adrs<3>& w_adrs<2>&^w_adrs<1>& w_adrs<0> : file5 := w_data ; ^w_adrs<4>&^w_adrs<3>& w_adrs<2>&^w_adrs<1>&^w_adrs<0> : file4 := w_data ; ^w_adrs<4>&^w_adrs<3>&^w_adrs<2>& w_adrs<1>& w_adrs<0> : file3 := w_data ; ^w_adrs<4>&^w_adrs<3>&^w_adrs<2>& w_adrs<1>&^w_adrs<0> : file2 := w_data ; ^w_adrs<4>&^w_adrs<3>&^w_adrs<2>&^w_adrs<1>& w_adrs<0> : file1 := w_data ; } } }