Added 1-bit adder
This commit is contained in:
@@ -3,13 +3,9 @@
|
|||||||
<!--The data in this file is primarily intended for consumption by Xilinx tools.
|
<!--The data in this file is primarily intended for consumption by Xilinx tools.
|
||||||
The structure and the elements are likely to change over the next few releases.
|
The structure and the elements are likely to change over the next few releases.
|
||||||
This means code written to parse this file will need to be revisited each subsequent release.-->
|
This means code written to parse this file will need to be revisited each subsequent release.-->
|
||||||
<<<<<<< Updated upstream
|
<application name="pa" timeStamp="Fri Feb 15 14:50:48 2019">
|
||||||
<application name="pa" timeStamp="Fri Feb 8 19:07:41 2019">
|
|
||||||
=======
|
|
||||||
<application name="pa" timeStamp="Fri Feb 15 11:20:09 2019">
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
<section name="Project Information" visible="false">
|
<section name="Project Information" visible="false">
|
||||||
<property name="ProjectID" value="a5bb1d0d02704671b324cd827417f368" type="ProjectID"/>
|
<property name="ProjectID" value="cabf4166fb474d5f964bb35d114df571" type="ProjectID"/>
|
||||||
<property name="ProjectIteration" value="1" type="ProjectIteration"/>
|
<property name="ProjectIteration" value="1" type="ProjectIteration"/>
|
||||||
</section>
|
</section>
|
||||||
<section name="PlanAhead Usage" visible="true">
|
<section name="PlanAhead Usage" visible="true">
|
||||||
@@ -21,87 +17,19 @@ This means code written to parse this file will need to be revisited each subseq
|
|||||||
<property name="ImplStrategy" value="Vivado Implementation Defaults" type="ImplStrategy"/>
|
<property name="ImplStrategy" value="Vivado Implementation Defaults" type="ImplStrategy"/>
|
||||||
</item>
|
</item>
|
||||||
<item name="Java Command Handlers">
|
<item name="Java Command Handlers">
|
||||||
<<<<<<< Updated upstream
|
<property name="OpenProject" value="1" type="JavaHandler"/>
|
||||||
<property name="AddSources" value="4" type="JavaHandler"/>
|
<property name="ToggleViewNavigator" value="2" type="JavaHandler"/>
|
||||||
<property name="EditDelete" value="1" type="JavaHandler"/>
|
|
||||||
<property name="NewProject" value="2" type="JavaHandler"/>
|
|
||||||
<property name="OpenProject" value="2" type="JavaHandler"/>
|
|
||||||
=======
|
|
||||||
<property name="AddSources" value="3" type="JavaHandler"/>
|
|
||||||
<property name="NewProject" value="1" type="JavaHandler"/>
|
|
||||||
<property name="OpenProject" value="3" type="JavaHandler"/>
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
<property name="SaveProjectAs" value="1" type="JavaHandler"/>
|
|
||||||
<property name="ToolsSettings" value="1" type="JavaHandler"/>
|
|
||||||
</item>
|
</item>
|
||||||
<item name="Gui Handlers">
|
<item name="Gui Handlers">
|
||||||
<<<<<<< Updated upstream
|
<property name="FileSetPanel_FILE_SET_PANEL_TREE" value="11" type="GuiHandlerData"/>
|
||||||
<property name="BaseDialog_OK" value="7" type="GuiHandlerData"/>
|
<property name="GettingStartedView_OPEN_PROJECT" value="1" type="GuiHandlerData"/>
|
||||||
<property name="CreateSrcFileDialog_FILE_NAME" value="3" type="GuiHandlerData"/>
|
<property name="PACommandNames_TOGGLE_VIEW_NAV" value="2" type="GuiHandlerData"/>
|
||||||
=======
|
|
||||||
<property name="BaseDialog_CANCEL" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="BaseDialog_OK" value="3" type="GuiHandlerData"/>
|
|
||||||
<property name="ConfirmSaveTextEditsDialog_NO" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="CreateSrcFileDialog_FILE_NAME" value="1" type="GuiHandlerData"/>
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
<property name="FPGAChooser_CATEGORY" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="FPGAChooser_FAMILY" value="2" type="GuiHandlerData"/>
|
|
||||||
<property name="FPGAChooser_FPGA_TABLE" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="FPGAChooser_PACKAGE" value="1" type="GuiHandlerData"/>
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<property name="FileSetPanel_FILE_SET_PANEL_TREE" value="36" type="GuiHandlerData"/>
|
|
||||||
<property name="FlowNavigatorTreePanel_FLOW_NAVIGATOR_TREE" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="GettingStartedView_CREATE_NEW_PROJECT" value="2" type="GuiHandlerData"/>
|
|
||||||
=======
|
|
||||||
<property name="FileSetPanel_FILE_SET_PANEL_TREE" value="14" type="GuiHandlerData"/>
|
|
||||||
<property name="GettingStartedView_CREATE_NEW_PROJECT" value="1" type="GuiHandlerData"/>
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
<property name="GettingStartedView_OPEN_PROJECT" value="2" type="GuiHandlerData"/>
|
|
||||||
<property name="MainMenuMgr_CHECKPOINT" value="3" type="GuiHandlerData"/>
|
|
||||||
<property name="MainMenuMgr_EDIT" value="4" type="GuiHandlerData"/>
|
|
||||||
<property name="MainMenuMgr_FILE" value="10" type="GuiHandlerData"/>
|
|
||||||
<property name="MainMenuMgr_FLOW" value="12" type="GuiHandlerData"/>
|
|
||||||
<property name="MainMenuMgr_IP" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="MainMenuMgr_OPEN_RECENT_PROJECT" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="MainMenuMgr_PROJECT" value="7" type="GuiHandlerData"/>
|
|
||||||
<property name="MainMenuMgr_REPORTS" value="8" type="GuiHandlerData"/>
|
|
||||||
<property name="MainMenuMgr_SETTINGS" value="2" type="GuiHandlerData"/>
|
|
||||||
<property name="MainMenuMgr_TOOLS" value="16" type="GuiHandlerData"/>
|
|
||||||
<property name="PACommandNames_ADD_SOURCES" value="3" type="GuiHandlerData"/>
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<property name="PACommandNames_AUTO_UPDATE_HIER" value="7" type="GuiHandlerData"/>
|
|
||||||
=======
|
|
||||||
<property name="PACommandNames_AUTO_UPDATE_HIER" value="6" type="GuiHandlerData"/>
|
|
||||||
<property name="PACommandNames_OPEN_PROJECT" value="1" type="GuiHandlerData"/>
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
<property name="PACommandNames_SAVE_PROJECT_AS" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="PAViews_CODE" value="1" type="GuiHandlerData"/>
|
<property name="PAViews_CODE" value="1" type="GuiHandlerData"/>
|
||||||
<property name="ProjectNameChooser_CHOOSE_PROJECT_LOCATION" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="ProjectNameChooser_PROJECT_NAME" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="RDICommands_CUSTOM_COMMANDS" value="4" type="GuiHandlerData"/>
|
|
||||||
<property name="RDICommands_DELETE" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="RDICommands_SETTINGS" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="SettingsProjectGeneralPage_CHOOSE_DEVICE_FOR_YOUR_PROJECT" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="SrcChooserPanel_ADD_DIRECTORIES" value="1" type="GuiHandlerData"/>
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<property name="SrcChooserPanel_ADD_HDL_AND_NETLIST_FILES_TO_YOUR_PROJECT" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="SrcChooserPanel_CREATE_FILE" value="3" type="GuiHandlerData"/>
|
|
||||||
<property name="SrcMenu_IP_HIERARCHY" value="7" type="GuiHandlerData"/>
|
|
||||||
</item>
|
</item>
|
||||||
<item name="Other">
|
<item name="Other">
|
||||||
<property name="GuiMode" value="1" type="GuiMode"/>
|
<property name="GuiMode" value="59" type="GuiMode"/>
|
||||||
<property name="BatchMode" value="0" type="BatchMode"/>
|
<property name="BatchMode" value="0" type="BatchMode"/>
|
||||||
<property name="TclMode" value="0" type="TclMode"/>
|
<property name="TclMode" value="58" type="TclMode"/>
|
||||||
=======
|
|
||||||
<property name="SrcChooserPanel_CREATE_FILE" value="1" type="GuiHandlerData"/>
|
|
||||||
<property name="SrcMenu_IP_HIERARCHY" value="6" type="GuiHandlerData"/>
|
|
||||||
<property name="SyntheticaGettingStartedView_RECENT_PROJECTS" value="1" type="GuiHandlerData"/>
|
|
||||||
</item>
|
|
||||||
<item name="Other">
|
|
||||||
<property name="GuiMode" value="29" type="GuiMode"/>
|
|
||||||
<property name="BatchMode" value="0" type="BatchMode"/>
|
|
||||||
<property name="TclMode" value="24" type="TclMode"/>
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
</item>
|
</item>
|
||||||
</section>
|
</section>
|
||||||
</application>
|
</application>
|
||||||
|
|||||||
@@ -1,5 +1,17 @@
|
|||||||
`timescale 1ns / 1ps
|
`timescale 1ns / 1ps
|
||||||
|
|
||||||
|
module adder_1bit(
|
||||||
|
input wire A,
|
||||||
|
input wire B,
|
||||||
|
input wire Cin,
|
||||||
|
output wire S,
|
||||||
|
output wire Cout);
|
||||||
|
|
||||||
|
assign S = (A ^ B) ^ Cin;
|
||||||
|
assign Cout = ((A ^ B) & Cin) | (A & B);
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
|
||||||
module gen_clock();
|
module gen_clock();
|
||||||
|
|
||||||
reg clk;
|
reg clk;
|
||||||
@@ -19,6 +31,7 @@ module inverter(
|
|||||||
output wire B);
|
output wire B);
|
||||||
|
|
||||||
assign B = ~A;
|
assign B = ~A;
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
module mux(input wire [1:0] switch,
|
module mux(input wire [1:0] switch,
|
||||||
@@ -33,6 +46,7 @@ module mux(input wire [1:0] switch,
|
|||||||
default: out = D;
|
default: out = D;
|
||||||
endcase
|
endcase
|
||||||
end
|
end
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
module register(input wire clk, reset,
|
module register(input wire clk, reset,
|
||||||
|
|||||||
Reference in New Issue
Block a user