aboutsummaryrefslogtreecommitdiff
path: root/test/chisel3/Control.fir
diff options
context:
space:
mode:
authorazidar2015-07-10 13:25:21 -0700
committerazidar2015-07-14 11:29:55 -0700
commit0bfb3618b654a4082cc2780887b3ca32e374f455 (patch)
tree230b7cbc96589be229e6f3d87f21300fb8fd84c3 /test/chisel3/Control.fir
parent0d63d521de85d1c6b9109e019101d0f575d063f7 (diff)
Added clock support
Diffstat (limited to 'test/chisel3/Control.fir')
-rw-r--r--test/chisel3/Control.fir108
1 files changed, 55 insertions, 53 deletions
diff --git a/test/chisel3/Control.fir b/test/chisel3/Control.fir
index 28bb3d87..08824c33 100644
--- a/test/chisel3/Control.fir
+++ b/test/chisel3/Control.fir
@@ -3,93 +3,95 @@
circuit Control :
module Control :
+ input clk : Clock
+ input reset : UInt<1>
output ctrl : {flip inst : UInt<32>, st_type : UInt<2>, ld_type : UInt<3>, wb_sel : UInt<2>, wb_en : UInt<1>, csr_cmd : UInt<2>, pc_sel : UInt<1>, inst_re : UInt<1>, flip stall : UInt<1>, data_re : UInt<1>, inst_type : UInt<1>, A_sel : UInt<1>, B_sel : UInt<1>, imm_sel : UInt<3>, alu_op : UInt<4>, br_type : UInt<3>}
- node T_831 = bit-and(UInt<7>(127), ctrl.inst)
+ node T_831 = and(UInt<7>(127), ctrl.inst)
node T_832 = eq(T_831, UInt<6>(55))
- node T_833 = bit-and(UInt<7>(127), ctrl.inst)
+ node T_833 = and(UInt<7>(127), ctrl.inst)
node T_834 = eq(T_833, UInt<5>(23))
- node T_835 = bit-and(UInt<7>(127), ctrl.inst)
+ node T_835 = and(UInt<7>(127), ctrl.inst)
node T_836 = eq(T_835, UInt<7>(111))
- node T_837 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_837 = and(UInt<15>(28799), ctrl.inst)
node T_838 = eq(T_837, UInt<7>(103))
- node T_839 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_839 = and(UInt<15>(28799), ctrl.inst)
node T_840 = eq(T_839, UInt<7>(99))
- node T_841 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_841 = and(UInt<15>(28799), ctrl.inst)
node T_842 = eq(T_841, UInt<13>(4195))
- node T_843 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_843 = and(UInt<15>(28799), ctrl.inst)
node T_844 = eq(T_843, UInt<15>(16483))
- node T_845 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_845 = and(UInt<15>(28799), ctrl.inst)
node T_846 = eq(T_845, UInt<15>(20579))
- node T_847 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_847 = and(UInt<15>(28799), ctrl.inst)
node T_848 = eq(T_847, UInt<15>(24675))
- node T_849 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_849 = and(UInt<15>(28799), ctrl.inst)
node T_850 = eq(T_849, UInt<15>(28771))
- node T_851 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_851 = and(UInt<15>(28799), ctrl.inst)
node T_852 = eq(T_851, UInt<2>(3))
- node T_853 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_853 = and(UInt<15>(28799), ctrl.inst)
node T_854 = eq(T_853, UInt<13>(4099))
- node T_855 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_855 = and(UInt<15>(28799), ctrl.inst)
node T_856 = eq(T_855, UInt<14>(8195))
- node T_857 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_857 = and(UInt<15>(28799), ctrl.inst)
node T_858 = eq(T_857, UInt<15>(16387))
- node T_859 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_859 = and(UInt<15>(28799), ctrl.inst)
node T_860 = eq(T_859, UInt<15>(20483))
- node T_861 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_861 = and(UInt<15>(28799), ctrl.inst)
node T_862 = eq(T_861, UInt<6>(35))
- node T_863 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_863 = and(UInt<15>(28799), ctrl.inst)
node T_864 = eq(T_863, UInt<13>(4131))
- node T_865 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_865 = and(UInt<15>(28799), ctrl.inst)
node T_866 = eq(T_865, UInt<14>(8227))
- node T_867 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_867 = and(UInt<15>(28799), ctrl.inst)
node T_868 = eq(T_867, UInt<5>(19))
- node T_869 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_869 = and(UInt<15>(28799), ctrl.inst)
node T_870 = eq(T_869, UInt<14>(8211))
- node T_871 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_871 = and(UInt<15>(28799), ctrl.inst)
node T_872 = eq(T_871, UInt<14>(12307))
- node T_873 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_873 = and(UInt<15>(28799), ctrl.inst)
node T_874 = eq(T_873, UInt<15>(16403))
- node T_875 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_875 = and(UInt<15>(28799), ctrl.inst)
node T_876 = eq(T_875, UInt<15>(24595))
- node T_877 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_877 = and(UInt<15>(28799), ctrl.inst)
node T_878 = eq(T_877, UInt<15>(28691))
- node T_879 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_879 = and(UInt<32>(4261441663), ctrl.inst)
node T_880 = eq(T_879, UInt<13>(4115))
- node T_881 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_881 = and(UInt<32>(4261441663), ctrl.inst)
node T_882 = eq(T_881, UInt<15>(20499))
- node T_883 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_883 = and(UInt<32>(4261441663), ctrl.inst)
node T_884 = eq(T_883, UInt<31>(1073762323))
- node T_885 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_885 = and(UInt<32>(4261441663), ctrl.inst)
node T_886 = eq(T_885, UInt<6>(51))
- node T_887 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_887 = and(UInt<32>(4261441663), ctrl.inst)
node T_888 = eq(T_887, UInt<31>(1073741875))
- node T_889 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_889 = and(UInt<32>(4261441663), ctrl.inst)
node T_890 = eq(T_889, UInt<13>(4147))
- node T_891 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_891 = and(UInt<32>(4261441663), ctrl.inst)
node T_892 = eq(T_891, UInt<14>(8243))
- node T_893 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_893 = and(UInt<32>(4261441663), ctrl.inst)
node T_894 = eq(T_893, UInt<14>(12339))
- node T_895 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_895 = and(UInt<32>(4261441663), ctrl.inst)
node T_896 = eq(T_895, UInt<15>(16435))
- node T_897 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_897 = and(UInt<32>(4261441663), ctrl.inst)
node T_898 = eq(T_897, UInt<15>(20531))
- node T_899 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_899 = and(UInt<32>(4261441663), ctrl.inst)
node T_900 = eq(T_899, UInt<31>(1073762355))
- node T_901 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_901 = and(UInt<32>(4261441663), ctrl.inst)
node T_902 = eq(T_901, UInt<15>(24627))
- node T_903 = bit-and(UInt<32>(4261441663), ctrl.inst)
+ node T_903 = and(UInt<32>(4261441663), ctrl.inst)
node T_904 = eq(T_903, UInt<15>(28723))
- node T_905 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_905 = and(UInt<15>(28799), ctrl.inst)
node T_906 = eq(T_905, UInt<13>(4211))
- node T_907 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_907 = and(UInt<15>(28799), ctrl.inst)
node T_908 = eq(T_907, UInt<14>(8307))
- node T_909 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_909 = and(UInt<15>(28799), ctrl.inst)
node T_910 = eq(T_909, UInt<14>(12403))
- node T_911 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_911 = and(UInt<15>(28799), ctrl.inst)
node T_912 = eq(T_911, UInt<15>(20595))
- node T_913 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_913 = and(UInt<15>(28799), ctrl.inst)
node T_914 = eq(T_913, UInt<15>(24691))
- node T_915 = bit-and(UInt<15>(28799), ctrl.inst)
+ node T_915 = and(UInt<15>(28799), ctrl.inst)
node T_916 = eq(T_915, UInt<15>(28787))
node T_917 = mux(T_916, UInt<1>(0), UInt<1>(0))
node T_918 = mux(T_914, UInt<1>(0), T_917)
@@ -609,20 +611,20 @@ circuit Control :
node T_1432 = mux(T_832, UInt<2>(0), T_1431)
node rs1_addr = bits(ctrl.inst, 19, 15)
node rs2_addr = bits(ctrl.inst, 24, 20)
- reg st_type : UInt<2>
- reg ld_type : UInt<3>
- reg wb_sel : UInt<2>
+ reg st_type : UInt<2>, clk, reset
+ reg ld_type : UInt<3>, clk, reset
+ reg wb_sel : UInt<2>, clk, reset
node T_1433 = bit(T_1389, 0)
- reg wb_en : UInt<1>
- reg csr_cmd : UInt<2>
+ reg wb_en : UInt<1>, clk, reset
+ reg csr_cmd : UInt<2>, clk, reset
ctrl.pc_sel := T_959
- node T_1434 = bit-not(ctrl.stall)
- node T_1435 = bit-not(ctrl.data_re)
- node T_1436 = bit-and(T_1434, T_1435)
+ node T_1434 = not(ctrl.stall)
+ node T_1435 = not(ctrl.data_re)
+ node T_1436 = and(T_1434, T_1435)
ctrl.inst_re := T_1436
node T_1437 = neq(T_1303, UInt<3>(7))
node T_1438 = bit(T_1217, 0)
- node T_1439 = bit-or(T_1437, T_1438)
+ node T_1439 = or(T_1437, T_1438)
node T_1440 = mux(T_1439, UInt<1>(1), UInt<1>(0))
ctrl.inst_type := T_1440
ctrl.A_sel := T_1002
@@ -631,7 +633,7 @@ circuit Control :
ctrl.alu_op := T_1131
ctrl.br_type := T_1174
ctrl.st_type := T_1260
- node T_1441 = bit-not(ctrl.stall)
+ node T_1441 = not(ctrl.stall)
when T_1441 :
st_type := ctrl.st_type
ld_type := T_1303