计算机指令仿真

使用软件的方式仿真计算机的指令

import java.awt.Color;
import javax.swing.JOptionPane;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.E
 */

// package computer_instrument;

/**
 *
 * @author NEWPLAN
 */
@SuppressWarnings("serial")
public class ComputerInstrution extends javax.swing.JFrame
{
	public String FT = "FT:\n\t", ST = "\nST:\n\t", DT = "\nDT:\n\t",
			ET = "\nET:\n\t";
	public String MIN_FT = "FT:\n\t", MIN_ST = "\nST:\n\t",
			MIN_DT = "\nDT:\n\t", MIN_ET = "\nET:\n\t";

	/**
	 * Creates new form ComputerInstrution
	 */
	public ComputerInstrution()
	{
		this.FT += "M->IR\n\tPC+1->PC\n";
		this.MIN_FT += "EMAR, R, SIR,CPST\n\tPC->A, A+1, DM, CPPC, 1->ST, CPST";
		initComponents();
		this.setSize(1100, 700);
	}

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	@SuppressWarnings("unchecked")
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents()
	{
		jLabel2 = new javax.swing.JLabel();
		jLabel3 = new javax.swing.JLabel();
		jLabel4 = new javax.swing.JLabel();
		jLabel5 = new javax.swing.JLabel();
		jTextField1 = new javax.swing.JTextField();
		jComboBox1 = new javax.swing.JComboBox();
		jComboBox2 = new javax.swing.JComboBox();
		jComboBox3 = new javax.swing.JComboBox();
		jComboBox4 = new javax.swing.JComboBox();
		jLabel6 = new javax.swing.JLabel();
		jLabel7 = new javax.swing.JLabel();
		jScrollPane1 = new javax.swing.JScrollPane();
		jTextArea1 = new javax.swing.JTextArea();
		jScrollPane2 = new javax.swing.JScrollPane();
		jTextArea2 = new javax.swing.JTextArea();
		jButton1 = new javax.swing.JButton();
		jButton2 = new javax.swing.JButton();
		jButton3 = new javax.swing.JButton();
		jLabel1 = new javax.swing.JLabel();
		jComboBox5 = new javax.swing.JComboBox();
		jLabel8 = new javax.swing.JLabel();
		jComboBox6 = new javax.swing.JComboBox();

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
		setTitle("课程设计");

		jLabel2.setText("指令格式");

		jLabel3.setText("源寄存器");

		jLabel4.setText("源寻址方式");

		jLabel5.setText("目的寄存器");

		jTextField1.setEditable(false);
		jTextArea1.setEditable(false);
		jTextArea2.setEditable(false);
		jTextField1.setBackground(Color.gray);
		jTextArea1.setBackground(Color.GRAY);
		jTextArea2.setBackground(Color.gray);
		/*
		 * jTextField1.addActionListener(new java.awt.event.ActionListener() {
		 * public void actionPerformed(java.awt.event.ActionEvent evt) {
		 * jTextField1ActionPerformed(evt); } });
		 */
		jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] {
				"MOV", "单操作指令", "双操作指令", "跳转指令,返回指令", "转子指令"
		}));
		jComboBox1.setSelectedIndex(-1);
		jComboBox1.addActionListener(new java.awt.event.ActionListener()
		{
			public void actionPerformed(java.awt.event.ActionEvent evt)
			{
				jComboBox1ActionPerformed(evt);
			}
		});
		jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] {
				"R0", "R1", "R2", "R3"
		}));
		jComboBox2.setSelectedIndex(-1);

		jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] {
				"R", "(R)", "-(R)", "(R)+", "@(R)+", "X(R)"
		}));
		jComboBox3.setSelectedIndex(-1);

		jComboBox4.setModel(new javax.swing.DefaultComboBoxModel(new String[] {
				"R0", "R1", "R2", "R3"
		}));
		jComboBox4.setSelectedIndex(-1);

		jComboBox2.setEnabled(false);
		jComboBox3.setEnabled(false);
		jComboBox4.setEnabled(false);
		jComboBox5.setEnabled(false);
		jComboBox6.setEnabled(false);

		jLabel6.setText("指令周期");

		jLabel7.setText("微命令");

		jTextArea1.setColumns(20);
		jTextArea1.setRows(5);
		jScrollPane1.setViewportView(jTextArea1);

		jTextArea2.setColumns(20);
		jTextArea2.setRows(5);
		jScrollPane2.setViewportView(jTextArea2);

		jButton1.setText("生成指令");
		jButton1.addActionListener(new java.awt.event.ActionListener()
		{
			public void actionPerformed(java.awt.event.ActionEvent evt)
			{
				jButton1ActionPerformed(evt);
			}
		});

		jButton2.setText("退出");
		jButton2.addActionListener(new java.awt.event.ActionListener()
		{
			public void actionPerformed(java.awt.event.ActionEvent evt)
			{
				jButton2ActionPerformed(evt);
			}
		});

		jButton3.setText("重新开始");
		jButton3.addActionListener(new java.awt.event.ActionListener()
		{
			public void actionPerformed(java.awt.event.ActionEvent evt)
			{
				jButton3ActionPerformed(evt);
			}
		});

		jLabel1.setText("选择指令");
		jComboBox5.setMaximumRowCount(20);
		jComboBox5.setModel(new javax.swing.DefaultComboBoxModel(new String[] {
				"MOV", "COM", "NEG", "INC", "DEC", "SL", "SR", "JMP", "RST",
				"ADD", "SUB", "AND", "OR", "EOR"
		}));
		jComboBox5.setSelectedIndex(-1);

		jLabel8.setText("目的寻址方式");

		jComboBox6.setModel(new javax.swing.DefaultComboBoxModel(new String[] {
				"R", "(R)", "-(R)", "(R)+", "@(R)+", "X(R)"
		}));
		jComboBox6.setSelectedIndex(-1);
		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout.setHorizontalGroup(layout
				.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
				.addGroup(
						layout.createSequentialGroup()
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.LEADING)
												.addGroup(
														layout.createParallelGroup(
																javax.swing.GroupLayout.Alignment.LEADING)
																.addGroup(
																		javax.swing.GroupLayout.Alignment.TRAILING,
																		layout.createSequentialGroup()
																				.addGap(27,
																						27,
																						27)
																				.addGroup(
																						layout.createParallelGroup(
																								javax.swing.GroupLayout.Alignment.LEADING)
																								.addComponent(
																										jButton1,
																										javax.swing.GroupLayout.Alignment.TRAILING,
																										javax.swing.GroupLayout.PREFERRED_SIZE,
																										98,
																										javax.swing.GroupLayout.PREFERRED_SIZE)
																								.addComponent(
																										jButton3,
																										javax.swing.GroupLayout.Alignment.TRAILING)))
																.addGroup(
																		layout.createSequentialGroup()
																				.addGap(68,
																						68,
																						68)
																				.addGroup(
																						layout.createParallelGroup(
																								javax.swing.GroupLayout.Alignment.LEADING)
																								.addComponent(
																										jLabel2,
																										javax.swing.GroupLayout.PREFERRED_SIZE,
																										57,
																										javax.swing.GroupLayout.PREFERRED_SIZE)
																								.addComponent(
																										jLabel1,
																										javax.swing.GroupLayout.PREFERRED_SIZE,
																										57,
																										javax.swing.GroupLayout.PREFERRED_SIZE))
																				.addGap(12,
																						12,
																						12)))
												.addGroup(
														layout.createSequentialGroup()
																.addGap(68, 68,
																		68)
																.addGroup(
																		layout.createParallelGroup(
																				javax.swing.GroupLayout.Alignment.LEADING)
																				.addComponent(
																						jLabel5,
																						javax.swing.GroupLayout.PREFERRED_SIZE,
																						69,
																						javax.swing.GroupLayout.PREFERRED_SIZE)
																				.addComponent(
																						jLabel4,
																						javax.swing.GroupLayout.PREFERRED_SIZE,
																						69,
																						javax.swing.GroupLayout.PREFERRED_SIZE)
																				.addComponent(
																						jLabel3,
																						javax.swing.GroupLayout.PREFERRED_SIZE,
																						57,
																						javax.swing.GroupLayout.PREFERRED_SIZE)
																				.addComponent(
																						jLabel8,
																						javax.swing.GroupLayout.PREFERRED_SIZE,
																						72,
																						javax.swing.GroupLayout.PREFERRED_SIZE))))
								.addGap(39, 39, 39)
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.LEADING,
												false)
												.addComponent(
														jComboBox2,
														0,
														javax.swing.GroupLayout.DEFAULT_SIZE,
														Short.MAX_VALUE)
												.addComponent(jComboBox3, 0,
														139, Short.MAX_VALUE)
												.addComponent(
														jComboBox4,
														0,
														javax.swing.GroupLayout.DEFAULT_SIZE,
														Short.MAX_VALUE)
												.addGroup(
														javax.swing.GroupLayout.Alignment.TRAILING,
														layout.createSequentialGroup()
																.addGap(0,
																		0,
																		Short.MAX_VALUE)
																.addComponent(
																		jButton2))
												.addComponent(
														jComboBox6,
														0,
														javax.swing.GroupLayout.DEFAULT_SIZE,
														Short.MAX_VALUE)
												.addComponent(jTextField1)
												.addComponent(
														jComboBox1,
														0,
														javax.swing.GroupLayout.DEFAULT_SIZE,
														Short.MAX_VALUE)
												.addComponent(
														jComboBox5,
														0,
														javax.swing.GroupLayout.DEFAULT_SIZE,
														Short.MAX_VALUE))
								.addGap(57, 57, 57)
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.LEADING)
												.addGroup(
														layout.createSequentialGroup()
																.addComponent(
																		jScrollPane1,
																		javax.swing.GroupLayout.PREFERRED_SIZE,
																		261,
																		javax.swing.GroupLayout.PREFERRED_SIZE)
																.addPreferredGap(
																		javax.swing.LayoutStyle.ComponentPlacement.RELATED)
																.addComponent(
																		jScrollPane2,
																		javax.swing.GroupLayout.DEFAULT_SIZE,
																		258,
																		Short.MAX_VALUE)
																.addContainerGap())
												.addGroup(
														layout.createSequentialGroup()
																.addComponent(
																		jLabel6)
																.addPreferredGap(
																		javax.swing.LayoutStyle.ComponentPlacement.RELATED,
																		javax.swing.GroupLayout.DEFAULT_SIZE,
																		Short.MAX_VALUE)
																.addComponent(
																		jLabel7)
																.addGap(155,
																		155,
																		155)))));
		layout.setVerticalGroup(layout
				.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
				.addGroup(
						layout.createSequentialGroup()
								.addGap(57, 57, 57)
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.BASELINE)
												.addComponent(jButton3)
												.addComponent(jButton2)
												.addComponent(jLabel6)
												.addComponent(jLabel7))
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.LEADING)
												.addGroup(
														layout.createSequentialGroup()
																.addGap(56, 56,
																		56)
																.addGroup(
																		layout.createParallelGroup(
																				javax.swing.GroupLayout.Alignment.BASELINE)
																				.addComponent(
																						jTextField1,
																						javax.swing.GroupLayout.PREFERRED_SIZE,
																						javax.swing.GroupLayout.DEFAULT_SIZE,
																						javax.swing.GroupLayout.PREFERRED_SIZE)
																				.addComponent(
																						jButton1))
																.addGap(41, 41,
																		41)
																.addGroup(
																		layout.createParallelGroup(
																				javax.swing.GroupLayout.Alignment.BASELINE)
																				.addComponent(
																						jLabel2)
																				.addComponent(
																						jComboBox1,
																						javax.swing.GroupLayout.PREFERRED_SIZE,
																						javax.swing.GroupLayout.DEFAULT_SIZE,
																						javax.swing.GroupLayout.PREFERRED_SIZE))
																.addGap(24, 24,
																		24)
																.addGroup(
																		layout.createParallelGroup(
																				javax.swing.GroupLayout.Alignment.BASELINE)
																				.addComponent(
																						jLabel1)
																				.addComponent(
																						jComboBox5,
																						javax.swing.GroupLayout.PREFERRED_SIZE,
																						javax.swing.GroupLayout.DEFAULT_SIZE,
																						javax.swing.GroupLayout.PREFERRED_SIZE))
																.addGap(32, 32,
																		32)
																.addGroup(
																		layout.createParallelGroup(
																				javax.swing.GroupLayout.Alignment.LEADING)
																				.addComponent(
																						jLabel3)
																				.addComponent(
																						jComboBox2,
																						javax.swing.GroupLayout.PREFERRED_SIZE,
																						javax.swing.GroupLayout.DEFAULT_SIZE,
																						javax.swing.GroupLayout.PREFERRED_SIZE))
																.addGap(36, 36,
																		36)
																.addGroup(
																		layout.createParallelGroup(
																				javax.swing.GroupLayout.Alignment.LEADING)
																				.addComponent(
																						jComboBox3,
																						javax.swing.GroupLayout.PREFERRED_SIZE,
																						javax.swing.GroupLayout.DEFAULT_SIZE,
																						javax.swing.GroupLayout.PREFERRED_SIZE)
																				.addComponent(
																						jLabel4))
																.addGap(38, 38,
																		38)
																.addGroup(
																		layout.createParallelGroup(
																				javax.swing.GroupLayout.Alignment.BASELINE)
																				.addComponent(
																						jLabel5)
																				.addComponent(
																						jComboBox4,
																						javax.swing.GroupLayout.PREFERRED_SIZE,
																						javax.swing.GroupLayout.DEFAULT_SIZE,
																						javax.swing.GroupLayout.PREFERRED_SIZE))
																.addGap(31, 31,
																		31)
																.addGroup(
																		layout.createParallelGroup(
																				javax.swing.GroupLayout.Alignment.BASELINE)
																				.addComponent(
																						jComboBox6,
																						javax.swing.GroupLayout.PREFERRED_SIZE,
																						javax.swing.GroupLayout.DEFAULT_SIZE,
																						javax.swing.GroupLayout.PREFERRED_SIZE)
																				.addComponent(
																						jLabel8))
																.addGap(0,
																		92,
																		Short.MAX_VALUE))
												.addGroup(
														layout.createSequentialGroup()
																.addGap(18, 18,
																		18)
																.addGroup(
																		layout.createParallelGroup(
																				javax.swing.GroupLayout.Alignment.LEADING)
																				.addComponent(
																						jScrollPane2,
																						javax.swing.GroupLayout.Alignment.TRAILING)
																				.addComponent(
																						jScrollPane1))))
								.addContainerGap()));

		pack();
	}

	private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)
	{
		/*
		 * 退出系统
		 */
		System.exit(EXIT_ON_CLOSE);
	}

	private void jButton3ActionPerformed(java.awt.event.ActionEvent evt)
	{
		/*
		 * 初始化系统
		 */

		jTextArea1.setText("");
		jTextArea2.setText("");
		jTextField1.setText("");
		jComboBox1.setSelectedIndex(-1);
		jComboBox2.setSelectedIndex(-1);
		jComboBox3.setSelectedIndex(-1);
		jComboBox4.setSelectedIndex(-1);
		jComboBox5.setSelectedIndex(-1);
		jComboBox6.setSelectedIndex(-1);
		jComboBox2.setEnabled(false);
		jComboBox3.setEnabled(false);
		jComboBox4.setEnabled(false);
		jComboBox5.setEnabled(false);
		jComboBox6.setEnabled(false);
	}

	@SuppressWarnings("static-access")
	private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
	{
		/************************/
		jTextArea1.setText("");
		jTextArea2.setText("");
		ST = "ST\n\t";
		DT = "DT\n\t";
		ET = "ET\n\t";
		MIN_ST = "\nST:\n\t";
		MIN_DT = "\nDT:\n\t";
		MIN_ET = "\nET:\n\t";
		String tempString = "\n";
		String tXT_READString = "";
		String messaStringjcombox2 = "", messaStringjcombox3 = "";
		String messaStringjcombox4 = "", messaStringjcombox5 = "", messaStringjcombox6 = "";
		JOptionPane tempJOptionPane = new JOptionPane();/* 错误提醒 */

		/***********************************************************************************/
		/* 选择指令方式 */
		if (jComboBox1.getSelectedIndex() < 0)
		{
			tempJOptionPane.showMessageDialog(null, "指令错误,指令模式非空,请重新输入!");
			this.jButton3ActionPerformed(null);
			return;
		}
		/* 指令格式 */
		if (jComboBox5.getSelectedIndex() < 0)
		{
			tempJOptionPane.showMessageDialog(null, "指令错误,指令非空,请重新输入!");
			this.jButton3ActionPerformed(null);
			return;
		}
		messaStringjcombox5 = jComboBox5.getSelectedItem().toString();

		/*
		 * ST周期
		 */
		switch (jComboBox1.getSelectedItem().toString())
		{
			case "MOV" :
			case "双操作指令" :
				if (jComboBox2.getSelectedIndex() < 0
						|| jComboBox3.getSelectedIndex() < 0
						|| jComboBox4.getSelectedIndex() < 0
						|| jComboBox6.getSelectedIndex() < 0)
				{
					tempJOptionPane.showMessageDialog(null,
							"指令错误,源操作数和目的操作数均不能为空,请重新输入!");
					this.jButton3ActionPerformed(null);
					return;
				}
				messaStringjcombox2 = jComboBox2.getSelectedItem().toString();
				messaStringjcombox3 = jComboBox3.getSelectedItem().toString();
				messaStringjcombox4 = jComboBox4.getSelectedItem().toString();
				messaStringjcombox6 = jComboBox6.getSelectedItem().toString();

				switch (messaStringjcombox3)
				{
					case "R" :
						ST += "\n";
						break;
					case "-(R)" :
						ST += messaStringjcombox2 + "-1->"
								+ messaStringjcombox2 + ","
								+ "MAR\n\tM->MDR->C\n";
						MIN_ST += messaStringjcombox2
								+ "->A, A-1, DM CPMAR, CP"
								+ messaStringjcombox2
								+ "T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPC, 1->DT, CPDT";
						break;
					case "(R)" :

						ST += messaStringjcombox2 + "->MAR\n\t" + "M->MDR->C\n";
						MIN_ST += messaStringjcombox2
								+ "->A, A, DM, CPMAR,T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPC, 1->DT, CPDT";
						break;
					case "(R)+" :
						ST += messaStringjcombox2 + "->MAR\n\t"
								+ "M->MDR->C\n\t" + messaStringjcombox2
								+ "+1->" + messaStringjcombox2 + "\n";
						MIN_ST += messaStringjcombox2
								+ "->A, A, DM,CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPC, T+1, CPT\n\t"
								+ messaStringjcombox2 + "->A, A+1, DM, CP"
								+ messaStringjcombox2
								+ "1-DT, CPDT, 1->DT, CPDT";
						break;
					case "@(R)+" :
						ST += messaStringjcombox2 + "->MAR\n\t"
								+ "M->MDR->C\n\t" + messaStringjcombox2
								+ "+1->" + messaStringjcombox2
								+ "\n\tC->MAR\n\tM->MDR->C\n";
						MIN_ST += messaStringjcombox2
								+ "->A, A, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPC, T+1, CPT\n\t"
								+ messaStringjcombox2
								+ "->A, A+1, DM, CP"
								+ messaStringjcombox2
								+ "T+1, CPT\n\t"
								+ "C->A, A, DM, CPMAR, T+1, CPSR\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPC, 1->DT, CPDT";
						break;
					case "X(R)" :
						ST += "PC->MAR,\n\tM->MDR->C,\n\tPC+1->PC,\n\tC+"
								+ messaStringjcombox2 + "->MAR,\n\tM->MDR->C\n";
						MIN_ST += "PC->A, A, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPC, T+1, CPT\n\t"
								+ "PC->A, A+1, SM, CPPC, T+1, CPT\n\t"
								+ messaStringjcombox2
								+ "->A, C->B, A+B, DM, CPMAR, T+1,CPST\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPC, 1->DT, CPDT";
						break;
					default :
						tempJOptionPane.showMessageDialog(null, "无效诗人!");
						break;
				}
				break;

			case "单操作指令" :
				if (jComboBox4.getSelectedIndex() < 0
						|| jComboBox6.getSelectedIndex() < 0)
				{
					tempJOptionPane.showMessageDialog(null,
							"指令错误,目的操作数不能为空,请重新输入!");
					this.jButton3ActionPerformed(null);
					return;
				}
				messaStringjcombox4 = jComboBox4.getSelectedItem().toString();
				messaStringjcombox6 = jComboBox6.getSelectedItem().toString();
			case "跳转指令,返回指令" :
				break;
			case "转子指令" :
				if (jComboBox2.getSelectedIndex() < 0
						|| jComboBox3.getSelectedIndex() < 0)
				{
					tempJOptionPane.showMessageDialog(null,
							"指令错误,源操作数不能为空,请重新输入!");
					this.jButton3ActionPerformed(null);
					return;
				}
				messaStringjcombox2 = jComboBox2.getSelectedItem().toString();
				messaStringjcombox3 = jComboBox3.getSelectedItem().toString();
				switch (messaStringjcombox3)
				{
					case "!PC" :
					case "PC" :
					case "R" :
						break;
					case "(R)" :
						ST += messaStringjcombox2 + "->MAR\n\t" + "M->MDR->C\n";
						MIN_ST += messaStringjcombox2
								+ "->A, A, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPC, 1->ET, CPET";
						break;
					case "(R)+" :
						ST += messaStringjcombox2 + "->MAR\n\t"
								+ "M->MDR->C\n\t" + messaStringjcombox2
								+ "+1->" + messaStringjcombox2 + "\n";
						MIN_ST += messaStringjcombox2
								+ "->A, A, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPC, T+1, CPT\n\t"
								+ messaStringjcombox2 + "->A, A+1, DM, CP"
								+ messaStringjcombox2 + ", 1->ET, CPET";
						break;
					default :
						break;
				}
				break;
			default :
				break;
		}

		/*
		 * DT周期
		 */
		switch (jComboBox1.getSelectedItem().toString())
		{
			case "MOV" :
				switch (messaStringjcombox6)
				{
					case "R" :
						break;
					case "(R)" :
						DT += messaStringjcombox4 + "->MAR\n";
						MIN_DT += messaStringjcombox4
								+ "->B, B+1,DM, CPMAR,1->ET, CPET\n";
						break;
					case "-(R)" :
						DT += messaStringjcombox4 + "-1->MAR,"
								+ messaStringjcombox4 + "\n";
						MIN_DT += messaStringjcombox4
								+ "->B, B-1, DM, CPMAR, CP"
								+ messaStringjcombox4 + "1->ET, CPET\n";
						break;
					case "(R)+" :
						DT += messaStringjcombox4 + "->MAR\n\t"
								+ messaStringjcombox4 + "+1->"
								+ messaStringjcombox4 + "\n";
						MIN_DT += messaStringjcombox4
								+ "->B, B, DM, CPMAR, T+1, CPT\n\t"
								+ messaStringjcombox4 + "->B, B+1, DM, CP"
								+ messaStringjcombox4 + ", 1->ET, CPET\n";
						break;
					case "@(R)+" :
						DT += messaStringjcombox4 + "->MAR\n\t"
								+ messaStringjcombox4 + "+1->"
								+ messaStringjcombox4 + "\n\tM->MDR->MAR\n";

						MIN_DT += messaStringjcombox4
								+ "->B, B, DM, CPMAR, T+1, CPT\n\t"
								+ messaStringjcombox4
								+ "->B, B+1, DM, CP"
								+ messaStringjcombox4
								+ ", T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPC, 1->ET, CPET";
						break;
					case "X(R)" :
						DT += "PC->MAR\n\t" + "PC+1->PC\n\t" + "M->MDR->D\n\t"
								+ "D+" + messaStringjcombox4 + "->MAR\n";
						MIN_DT += "PC->A, A, DMM CPMAR, T+1, CPT\n\t"
								+ "PC->A, A+1, DM, CPPC, T+1, CPT\n\t"
								+ messaStringjcombox4
								+ "->A, D->B, A+B, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPC, 1->ET, CPET";
						break;
					default :
						break;
				}
				break;
			case "双操作指令" :
			case "单操作指令" :
				switch (messaStringjcombox6)
				{
					case "R" :
						break;
					case "(R)" :
						DT += messaStringjcombox4 + "->MAR\n\t" + "M->MDR->D\n";
						MIN_DT += messaStringjcombox4
								+ "->A, A, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPD, 1->ET, CPET";
						break;
					case "-(R)" :
						DT += messaStringjcombox4 + "-1->MAR\n\t"
								+ messaStringjcombox4 + "-1->"
								+ messaStringjcombox4 + "\n\t" + "M->MDR->D\n";
						MIN_DT += messaStringjcombox4
								+ "->A, A-1, DM, CPMAR, CP"
								+ messaStringjcombox4
								+ ", T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPD, 1->ET, CPET";
						break;
					case "(R)+" :
						DT += messaStringjcombox4 + "->MAR\n\t"
								+ "M->MDR->D\n\t" + messaStringjcombox4
								+ "+1->" + messaStringjcombox4 + "\n";
						MIN_DT += messaStringjcombox4
								+ "->A, A, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPD, T+1, CPT\n\t"
								+ messaStringjcombox4 + "->B, B+1, DM, CP"
								+ messaStringjcombox4 + "1->ET, CPET";

						break;
					case "@(R)+" :
						DT += messaStringjcombox4 + "->MAR\n\t"
								+ "M->MDR->D\n\t" + messaStringjcombox4
								+ "+1->" + messaStringjcombox4
								+ "\n\tD->MAR\n\t" + "M->MDR->MAR\n";

						MIN_DT += messaStringjcombox4
								+ "->A, A, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPD,T+1, CPT\n\t"
								+ messaStringjcombox4
								+ "->B, B+1, DM, CP"
								+ messaStringjcombox4
								+ ", T+1, CPT\n\t"
								+ "D->A, A, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPD, 1->ET, CPET";
						break;
					case "X(R)" :
						DT += "PC->MAR\n\t" + "M->MDR->D\n\t" + "PC+1->PC\n\t"
								+ "D" + messaStringjcombox4 + "->MAR\n\t"
								+ "M->MDR->D\n";
						MIN_DT += "PC->A, A, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPD, T+1, CPT\n\t"
								+ "PC->A, A+1, DM, CPPC, T+1, CPT\n\t"
								+ messaStringjcombox4
								+ "->A, D->B, A+B, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPD, 1->ET, CPET";
						break;
					default :
						break;
				}
				break;

			case "跳转指令,返回指令" :
			case "转子指令" :
				break;
			default :
				break;
		}
		/*
		 * ET周期
		 */
		String modelString = "";
		String opsString = "";
		if (!jComboBox1.getSelectedItem().toString().equalsIgnoreCase("单操作指令"))
		{
			messaStringjcombox2 = jComboBox2.getSelectedItem().toString();
			messaStringjcombox3 = jComboBox3.getSelectedItem().toString();
		}
		modelString += messaStringjcombox3.equalsIgnoreCase("R") ? "0" : "1";
		modelString += messaStringjcombox6.equalsIgnoreCase("R") ? "0" : "1";

		switch (messaStringjcombox5)
		{
			case "ADD" :
				opsString = "+";
				break;
			case "SUB" :
				opsString = "-";
				break;
			case "AND" :
				opsString = "&";
				break;
			case "OR" :
				opsString = "|";
				break;
			case "EOR" :
				opsString = "^";
				break;
			case "COM" :
				opsString = "~";
				break;
			case "NEG" :
				opsString = "~";
			case "SL" :
				opsString = "<<";
				break;
			case "SR" :
				opsString = ">>";
				break;
			default :
				break;
		}
		switch (jComboBox1.getSelectedItem().toString())
		{
			case "MOV" :
				switch (modelString)
				{
					case "00" :
						ET += messaStringjcombox2 + "->" + messaStringjcombox4
								+ "\n\t" + "PC->MAR";
						MIN_ET += messaStringjcombox2 + "->A, A, DM, CP"
								+ messaStringjcombox4 + ", T+1, CPT\n\t"
								+ "PC->A, A, DM, CPMAR";
						break;
					case "01" :
						ET += messaStringjcombox2 + "->MDR\n\t" + "MDR->M\n\t"
								+ "PC->MAR";
						MIN_ET += messaStringjcombox2 + "->A, A, DM, CPMDR\n\t"
								+ "EMAR, W, T+1, CPT\n\t"
								+ "PC->A, A, DM, CPMAR";
						break;
					case "10" :
						ET += "C->" + messaStringjcombox4 + "\n\t" + "PC->MAR";
						MIN_ET += "C->B, B, DM, CP" + messaStringjcombox4
								+ "T+1, CPT\n\t" + "PC->A, A, DM, CPMAR";
						break;
					case "11" :
						ET += "C->MDR\n\t" + "MDR->M\n\t" + "PC->MAR";
						MIN_ET += "C->B, B, DM, CPMDR, T+1, CPT\n\t"
								+ "EMAR, W, T+1, CPT\n\t"
								+ "PC->A, A, DM, CPMAR";
						break;
					default :
						break;
				}
				break;
			case "双操作指令" :
				switch (modelString)
				{
					case "00" :
						ET += messaStringjcombox2 + opsString
								+ messaStringjcombox4 + "->"
								+ messaStringjcombox4 + "\n\t" + "PC->MAR";
						MIN_ET += messaStringjcombox2 + "->A, "
								+ messaStringjcombox4 + "->B, A" + opsString
								+ "B, DM, CP" + messaStringjcombox4
								+ ", T+1, CPT\n\t" + "PC->A, A, DM, CPMAR";
						break;
					case "01" :
						ET += messaStringjcombox2 + opsString + "D->TMDR\n\t"
								+ "MDR->M\n\t" + "PC->MAR";

						MIN_ET += messaStringjcombox2 + "->A, " + "D->B, A"
								+ opsString + "B, DM, CPMDR, T+1, CPT\n\t"
								+ "EMAR, W, T+1, CPT\n\t"
								+ "PC->A, A, DM, CPMAR";
						break;
					case "10" :
						ET += "C" + opsString + messaStringjcombox4 + "->"
								+ messaStringjcombox4 + "\n\tPC->MAR";
						MIN_ET += "C->A, " + messaStringjcombox4 + "->B, A"
								+ opsString + "B, DM, CP" + messaStringjcombox4
								+ ", T+1, CPT\n\t" + "PC->A, A, DM, CPMAR";
						break;
					case "11" :
						ET += "D" + opsString + "C->MDR\n\t" + "MDR->M\n\t"
								+ "PC->MAR";
						MIN_ET += "C->A, D->B, A" + opsString
								+ "B, DM, CPMDR, T+1, CPT\n\t"
								+ "EMAR, W, T+1, CPT\n\t"
								+ "PC->A, A, DM, CPMAR";
						break;
					default :
						break;
				}
				break;
			case "单操作指令" :
				switch (messaStringjcombox6)
				{
					case "R" :
						switch (messaStringjcombox5)
						{
							case "COM" :
								ET += "~" + messaStringjcombox4 + "->"
										+ messaStringjcombox4 + "\n\t"
										+ "PC->MAR";
								MIN_ET += messaStringjcombox4
										+ "->A, ~A, DM, CP"
										+ messaStringjcombox4
										+ ", T+1, CPT\n\t"
										+ "PC->A, A, DM, CPMAR";
								break;
							case "NEG" :
								ET += "~" + messaStringjcombox4 + "+1->"
										+ messaStringjcombox4 + "\n\t"
										+ "PC->MAR";
								MIN_ET += messaStringjcombox4
										+ "->A, ~A+1, DM, CP"
										+ messaStringjcombox4
										+ ", T+1, CPT\n\t"
										+ "PC->A, A, DM, CPMAR";
								break;
							case "INC" :
								ET += messaStringjcombox4 + "+1->"
										+ messaStringjcombox4 + "\n\t"
										+ "PC->MAR";
								MIN_ET += messaStringjcombox4
										+ "->A, A+1, DM, CP"
										+ messaStringjcombox4
										+ ", T+1, CPT\n\t"
										+ "PC->A, A, DM, CPMAR";
								break;
							case "DEC" :
								ET += messaStringjcombox4 + "-1->"
										+ messaStringjcombox4 + "\n\t"
										+ "PC->MAR";
								MIN_ET += messaStringjcombox4
										+ "->A, A-1, DM, CP"
										+ messaStringjcombox4
										+ ", T+1, CPT\n\t"
										+ "PC->A, A, DM, CPMAR";
								break;
							case "SL" :
								ET += messaStringjcombox4 + "<<1->"
										+ messaStringjcombox4 + "\n\t"
										+ "PC->MAR";
								MIN_ET += messaStringjcombox4
										+ "->A, A, SL, CP"
										+ messaStringjcombox4
										+ ", T+1, CPT\n\t"
										+ "PC->A, A, DM, CPMAR";
								break;
							case "SR" :
								ET += messaStringjcombox4 + ">>1->"
										+ messaStringjcombox4 + "\n\t"
										+ "PC->MAR";
								MIN_ET += messaStringjcombox4
										+ "->A, A, SR, CP"
										+ messaStringjcombox4
										+ ", T+1, CPT\n\t"
										+ "PC->A, A, DM, CPMAR";
								break;

							default :
								break;
						}
						break;
					case "(R)" :
					case "-(R)" :
					case "(R)+" :
					case "@(R)+" :
					case "X(R)" :
						switch (messaStringjcombox5)
						{
							case "COM" :
								ET += "~D->MDR\n\t" + "MDR->M\n\t" + "PC->MAR";
								MIN_ET += "D->A, ~A, DM, CPMAR, T+1, CPT\n\t"
										+ "EMAR, W, T+1, CPT	\n\t"
										+ "PC->A, A, DM, CPMAR";
								break;
							case "NEG" :
								ET += "~D+1->MDR\n\t" + "MDR->M\n\t"
										+ "PC->MAR";
								MIN_ET += "D->A, ~A+1, DM, CPMDR, T+1, CPT\n\t"
										+ "EMAR, W, T+1, CPT	\n\t"
										+ "PC->A, A, DM, CPMAR";
								break;
							case "INC" :
								ET += "D+1->MDR\n\t" + "MDR->M\n\t" + "PC->MAR";
								MIN_ET += "D->A, A+1, DM, CPMDR, T+1, CPT\n\t"
										+ "EMAR, W, T+1, CPT	\n\t"
										+ "PC->A, A, DM, CPMAR";
								break;
							case "DEC" :
								ET += "D-1->MDR\n\t" + "MDR->M\n\t" + "PC->MAR";
								MIN_ET += "D->A, A-1, DM, CPMDR, T+1, CPT\n\t"
										+ "EMAR, W, T+1, CPT	\n\t"
										+ "PC->A, A, DM, CPMAR";
								break;
							case "SL" :
								ET += "D<<1->MDR\n\t" + "MDR->M\n\t"
										+ "PC->MAR";
								MIN_ET += "D->A, A, SL, CPMDR, T+1, CPT\n\t"
										+ "EMAR, W, T+1, CPT	\n\t"
										+ "PC->A, A, DM, CPMAR";
								break;
							case "SR" :
								ET += "D>>1->MDR\n\t" + "MDR->M\n\t"
										+ "PC->MAR";
								MIN_ET += "D->A, A, SR, CPMDR, T+1, CPT\n\t"
										+ "EMAR, W, T+1, CPT	\n\t"
										+ "PC->A, A, DM, CPMAR";
								break;

							default :
								break;
						}
						break;
					default :
						break;
				}
				break;
			case "跳转指令,返回指令" :
				switch (messaStringjcombox3)
				{
					case "!PC" :
						ET += "PC->MAR";
						MIN_ET += "PC->A, A, DM, CPMAR";
					case "PC" :
					case "SKP" :
						ET += "PC+1->PC,MAR";
						MIN_ET += "PC->A, A+1, DM, CPPC, CPMAR";
					case "R" :
						ET += messaStringjcombox2 + "->PC,MAR";
						MIN_ET += messaStringjcombox2
								+ "->A, A, DM, CPPC, CPMAR";
						break;
					case "(R)" :
						ET += messaStringjcombox2 + "->MAR\n\t"
								+ "M->MDR->PC,MAR";
						MIN_ET += messaStringjcombox2
								+ "->A, A, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, B, DM, CPMAR, CPPC";
						break;
					case "(R)+" :
						ET += messaStringjcombox2 + "->MAR\n\t"
								+ "M->MDR->PC,MAR\n\t" + messaStringjcombox2
								+ "+1->" + messaStringjcombox2;
						MIN_ET += messaStringjcombox2
								+ "->A, A, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, B, DM, CPMAR, CPPC, T+1, CPT\n\t"
								+ messaStringjcombox2 + "->A, A+1, DM, CP"
								+ messaStringjcombox2;
						break;
					case "X(PC)" :
						ET += "PC->MAR\n\t" + "M->MDR->C\n\t" + "PC+1->PC,MAR";
						MIN_ET += "PC->A, A, DM, CPMAR, T+1, CPT\n\t"
								+ "EMAR, R, SMDR, MDR->B, B, DM, CPC, T+1, CPT\n\t"
								+ "PC->A, A+1, DM, CPPC, CPMAR";
					default :
						break;
				}
				break;
			case "转子指令" :
				switch (messaStringjcombox3)
				{
					case "!PC" :
						ET += "PC->MAR";
						MIN_ET += "PC->A, A, DM, CPMAR";
					case "PC" :
						ET += "PC+1->PC,MAR";
						MIN_ET += "PC->A, A+1, DM, CPPC, CPMAR";
					case "R" :
						ET += "SP-1->SP,MAR\n\t" + "PC->MDR\n\t" + "MDR->M\n\t"
								+ messaStringjcombox2 + "->PC,MAR";
						MIN_ET += "SP->A, A-1, DM, CPSP, CPMAR, T+1, CPT\n\t"
								+ "PC->A, A, DM, CPMDR, T+1, CPT\n\t"
								+ "EMAR, W, T+1, CPT\n\t" + messaStringjcombox2
								+ "->B, B, DM, CPPC, CPMAR";
						break;

					case "(R)" :
					case "(R)+" :
						ET += "SP-1->SP,MAR\n\t" + "PC->MDR\n\t" + "MDR->M\n\t"
								+ "C->PC,MAR";
						MIN_ET += "SP->A, A-1, DM, CPSP, CPMAR, T+1, CPT\n\t"
								+ "PC->A, A, DM, CPMDR, T+1, CPT\n\t"
								+ "EMAR, W, T+1, CPT\n\t"
								+ "C->B, B, DM, CPPC, CPMAR";
						break;
					default :
						break;
				}
				break;
			default :
				break;
		}
		if (messaStringjcombox2.equalsIgnoreCase(messaStringjcombox4))
		{
			tempJOptionPane.showMessageDialog(null, "源操作数和目的操作数寄存去不能复用,请重新输入!");
			this.jButton3ActionPerformed(null);
			return;
		}
		if (ST.equalsIgnoreCase("ST\n\t"))
		{
			ST+="\n";
		}
		if (DT.equalsIgnoreCase("DT\n\t"))
		{
			DT+="\n";
		}
		/**************************************************************************************/
		String tempString2 = messaStringjcombox6.isEmpty()||messaStringjcombox3.isEmpty() ? "" : ", ";
		tXT_READString = messaStringjcombox5 + "  "
				+ messaStringjcombox3.replace("R", messaStringjcombox2)
				+ tempString2
				+ messaStringjcombox6.replace("R", messaStringjcombox4);
		/* 输出到指令框 */
		jTextField1.setText(tXT_READString);

		/* 输出到指令周期框 */
		jTextArea1.setColumns(20);
		jTextArea1.setRows(5);
		ST = ST.equalsIgnoreCase("ST\n\t") ? "ST\n" : ST;
		DT = DT.equalsIgnoreCase("DT\n\t") ? "DT\n" : DT;
		ET = ET.equalsIgnoreCase("ET\n\t") ? "ET\n" : ET;
		jTextArea1.setText(FT + ST + DT + ET + tempString);
		jScrollPane1.setViewportView(jTextArea1);

		/* 输出到微命令框 */
		jTextArea2.setColumns(20);
		jTextArea2.setRows(5);
		jTextArea2.setText(MIN_FT + MIN_ST + MIN_DT + MIN_ET);
		jScrollPane2.setViewportView(jTextArea2);

	}

	private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt)
	{
		// TODO add your handling code here:
	}

	@SuppressWarnings({ "unchecked", "rawtypes"
	})
	private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt)
	{
		// TODO add your handling code here:

		jComboBox2.setEnabled(true);
		jComboBox3.setEnabled(true);
		jComboBox4.setEnabled(true);
		jComboBox5.setEnabled(true);
		jComboBox6.setEnabled(true);
		if (jComboBox1.getSelectedIndex() < 0)
		{
			jComboBox2.setEnabled(false);
			jComboBox3.setEnabled(false);
			jComboBox4.setEnabled(false);
			jComboBox5.setEnabled(false);
			jComboBox6.setEnabled(false);
			return;
		}

		switch (jComboBox1.getSelectedItem().toString())
		{
			case "MOV" :
				jComboBox5.setModel(new javax.swing.DefaultComboBoxModel(
						new String[] { "MOV"
						}));
				break;
			case "双操作指令" :
				jComboBox5.setModel(new javax.swing.DefaultComboBoxModel(
						new String[] { "ADD", "SUB", "AND", "OR", "EOR"
						}));
				jComboBox5.setSelectedIndex(-1);
				break;
			case "跳转指令,返回指令" :
				jComboBox4.setEnabled(false);
				jComboBox6.setEnabled(false);
				jComboBox5.setModel(new javax.swing.DefaultComboBoxModel(
						new String[] { "JMP", "RST",
						}));
				jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(
						new String[] { "R0", "R1", "R2", "R3"
						}));
				jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(
						new String[] { "R", "(R)", "(R)+", "X(PC)", "PC", "!PC"
						}));
				jComboBox5.setSelectedIndex(-1);
				jComboBox3.setSelectedIndex(-1);
				jComboBox2.setSelectedIndex(-1);
				break;
			case "单操作指令" :
				jComboBox2.setEnabled(false);
				jComboBox3.setEnabled(false);
				jComboBox5.setModel(new javax.swing.DefaultComboBoxModel(
						new String[] { "COM", "NEG", "INC", "DEC", "SL", "SR"
						}));
				jComboBox5.setSelectedIndex(-1);
				break;
			case "转子指令" :
				jComboBox5.setModel(new javax.swing.DefaultComboBoxModel(
						new String[] { "JSR"
						}));
				jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(
						new String[] { "R0", "R1", "R2", "R3"
						}));
				jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(
						new String[] { "R", "(R)", "(R)+", "PC", "!PC"
						}));
				jComboBox4.setEnabled(false);
				jComboBox6.setEnabled(false);
				jComboBox3.setSelectedIndex(-1);
				jComboBox2.setSelectedIndex(-1);
				break;
			default :
				break;
		}
	}

	/**
	 * @param args
	 *            the command line arguments
	 */
	public static void main(String args[])
	{
		/* Set the Nimbus look and feel */
		// <editor-fold defaultstate="collapsed"
		// desc=" Look and feel setting code (optional) ">
		/*
		 * If Nimbus (introduced in Java SE 6) is not available, stay with the
		 * default look and feel. For details see
		 * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel
		 * /plaf.html
		 */
		try
		{
			for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager
					.getInstalledLookAndFeels())
			{
				if ("Nimbus".equals(info.getName()))
				{
					javax.swing.UIManager.setLookAndFeel(info.getClassName());
					break;
				}
			}
		}
		catch (ClassNotFoundException ex)
		{
			java.util.logging.Logger.getLogger(
					ComputerInstrution.class.getName()).log(
					java.util.logging.Level.SEVERE, null, ex);
		}
		catch (InstantiationException ex)
		{
			java.util.logging.Logger.getLogger(
					ComputerInstrution.class.getName()).log(
					java.util.logging.Level.SEVERE, null, ex);
		}
		catch (IllegalAccessException ex)
		{
			java.util.logging.Logger.getLogger(
					ComputerInstrution.class.getName()).log(
					java.util.logging.Level.SEVERE, null, ex);
		}
		catch (javax.swing.UnsupportedLookAndFeelException ex)
		{
			java.util.logging.Logger.getLogger(
					ComputerInstrution.class.getName()).log(
					java.util.logging.Level.SEVERE, null, ex);
		}

		/* Create and display the form */
		java.awt.EventQueue.invokeLater(new Runnable()
		{
			public void run()
			{
				new ComputerInstrution().setVisible(true);
			}
		});
	}

	// Variables declaration - do not modify
	private javax.swing.JButton jButton1;
	private javax.swing.JButton jButton2;
	private javax.swing.JButton jButton3;
	private javax.swing.JComboBox jComboBox1;
	private javax.swing.JComboBox jComboBox2;
	private javax.swing.JComboBox jComboBox3;
	private javax.swing.JComboBox jComboBox4;
	private javax.swing.JComboBox jComboBox5;
	private javax.swing.JComboBox jComboBox6;
	private javax.swing.JLabel jLabel1;
	private javax.swing.JLabel jLabel2;
	private javax.swing.JLabel jLabel3;
	private javax.swing.JLabel jLabel4;
	private javax.swing.JLabel jLabel5;
	private javax.swing.JLabel jLabel6;
	private javax.swing.JLabel jLabel7;
	private javax.swing.JLabel jLabel8;
	private javax.swing.JScrollPane jScrollPane1;
	private javax.swing.JScrollPane jScrollPane2;
	private javax.swing.JTextArea jTextArea1;
	private javax.swing.JTextArea jTextArea2;
	private javax.swing.JTextField jTextField1;
	// End of variables declaration
}
时间: 2024-10-11 18:14:54

计算机指令仿真的相关文章

物理仿真

1.捕捉 @interfaceViewController () //声明仿真器属性  保命啊 @property(nonatomic,strong)UIDynamicAnimator *animator; @property (weak, nonatomic) IBOutlet UIImageView *imageView; @end @implementation ViewController //物理仿真器懒加载 -(UIDynamicAnimator *)animator{    if

什么是 开发环境、测试环境、生产环境、UAT环境、仿真环境

开发环境:开发环境是程序猿们专门用于开发的服务器,配置可以比较随意, 为了开发调试方便,一般打开全部错误报告. 测试环境:一般是克隆一份生产环境的配置,一个程序在测试环境工作不正常,那么肯定不能把它发布到生产机上. 生产环境:是指正式提供对外服务的,一般会关掉错误报告,打开错误日志.可以理解为包含所有的功能的环境,任何项目所使用的环境都以这个为基础,然后根据客户的个性化需求来做调整或者修改. 三个环境也可以说是系统开发的三个阶段:开发->测试->上线,其中生产环境也就是通常说的真实环境. UA

CCSDS标准的LDPC编译码仿真

html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,ca

工业锻造过程仿真分析软件 Simufact.Forming v13.3.1

MSC.SIMUFACT.FORMING.V13.3-MAGNiTUDE\ Simufact.Forming v13.3.1 1DVD Simufact 是一套工业锻造过程仿真分析软件,由功能极强的有限体积求解器和WINDOWS风格的图形接口的所集成友好仿真分析运用软件.利用Simufact的锻造模拟技术,能够作出更快.更经济的仿真试验,加快产品导入市场的时间. 锻造是高度非线性工艺过程,需要材料和模具与工件之间复杂的相互作用.在多数情形下,锻造的毛坯形状相当简单,但最终产品的几何形状非常复杂,

基于HTML5的燃气3D培训仿真系统

最近上线了的基于HTML5的燃气3D培训仿真系统,以前的老系统是采用基于C++和OpenGL的OpenSceneGraph引擎设计的,OSG引擎性能和渲染效果各方面还是不错的,但因为这次新产品需求要求能运行多移动终端,多年前基于MFC封装OSG的老系统架构也实在该退休了,这年头找能维护MFC这种古董级GUI的靠谱人也非易事. 系统最终采用HT for Web的3D框架实现,项目中的程序员也很高兴有这样的机会终于摆脱维护MFC老系统的宿命,虽然大家都只有C++的开发经验,对HTML/CSS/JS并

非均匀阵线阵前后向平滑仿真

1.天线阵形 应用在一维阵列的空间平滑算法,要求在天线阵所在的一维空间内,存在两个以上完全相同的子阵,子阵的数量决定阵列能够解决的相参(干)信号源的数目,阵列共能对子阵阵元数-1个信号进行测向. 相对于均匀阵列,非均匀阵具有较大的测向范围,较优的最大基线,且能够降低阵元间隔大于信号最小半波长所引起的谱峰模糊,因此本方案拟采取非均匀线阵作为目标子阵,并对三种低阵元数,包含两个对称子阵的阵列进行了仿真分析. 按空间平滑算法的排布要求,非均匀阵列仅可共用一个阵元,同时两子阵的距离远远大于信号的半波长,

Chipscope 仿真VmodCAM IIC程序

Chipscope 仿真VmodCAM IIC程序: 目的:熟悉EDK中建立chipscope 注意:zedboard使用digilent USB下载时,chipscope不能和SDK同一时候使用.否则芯片会死机. 要用仿真器烧敲代码. 1:搭建硬件平台 硬件平台例如以下所看到的:详细的EDK设计流程參见XILINX大学workshop http://china.xilinx.com/support/university/professors.html 搭建后的平台见下图,当中除了IIC和axi

第十一周plecs仿真

1.比例控制仿真 比例系数为2,仿真结果如下图,速度由123rad/s变为121rad/s 2.比例积分控制仿真 调节参数 仿真结果,可以看出转速无静差

第九周非小组仿真以及阅读问题

1.  单相桥式晶闸管整流电路仿真 a.首先手工画出纯阻性负载条件下,在触发角分别为pi/4和pi/2情况下,电源电压.晶闸管Thy1和Thy3两端电压.负载电压的波形. b.在PLECS中建立该模型,并设置同样的触发角,观看仿真波形,看是否与自己所画的波形一致. 如图: 触发角为pi/4: 触发角为pi/2: c.增加负载电感值,改变不同的晶闸管触发角,观察负载电压和电流的变化 触发角为pi/6和pi/3,电感值为1L: 触发角为pi/6和pi/3,电感值为5L: 2. 三相六脉波桥式晶闸管整