⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cnt-combin.scr

📁 design compile synthesis user guide
💻 SCR
字号:
/************************************************************************//*			Count Zeros - Combinational Version 		*//************************************************************************//*  									*//* This "count zeros" example is from a design problem where an 8-bit 	*//* value is given, and the circuit is to determine two things: first, 	*//* that there is exactly one sequence of 0s in the value, and second, 	*//* the number of 0s in that sequence (if any). This computation must 	*//* be completed in a single clock cycle. The circuit's input is an 	*//* 8-bit value, and it produces two outputs:  the number of zeros found,*//* and an error indication.						*//*  									*//* A legal value is one that contains only one consecutive series of 	*//* zeros.  If more than one series of zeros appears, then the value is 	*//* illegal.  A value consisting entirely of ones is defined as a legal 	*//* value.  If a value is illegal, then the zero counter is reset (to 	*//* zero).  For example, the value 00000000 is legal and has 8 zeros; 	*//* value 11000111 is legal and has 3 zeros; value 001111100 is not 	*//* legal.								*//*  									*//* To solve this design problem, the designer has written two Verilog 	*//* functions: legal and zeros. The function legal determines if the 	*//* value is legal. It returns a one- bit value, 1 for a legal value, 	*//* 0 for an illegal value. The function zeros cycles through all bits 	*//* of the value, counts the number of zeros, and returns this value. 	*//* The two functions are controlled by continuous assignment	 	*//* statements at the bottom of the module definition			*//*  									*//* This example shows a combinational (parallel) approach to counting 	*//* the zeros; the next example shows a sequential (serial) approach.	*//*  									*//* The Verilog code implementing this example is contained in file 	*//* cnt-combin.v 							*//*  									*//************************************************************************//************************************************************************//*  									*//* To try this example, the following commands would be run:		*//* First, set up the path to the libraries. To use a different 		*//* technology library, these variables may be changed. 			*//*  									*//************************************************************************/search_path = { ., synopsys_root + /libraries/syn}target_library = {class.db}symbol_library = {class.sdb}link_path = {class.db}/************************************************************************//*  									*//* The read command is used to read in the Verilog source file.	 	*//*  									*//*	The read command is described in the Design Compiler Command	*//* 	Reference Manual.						*//*  									*//************************************************************************/read -format verilog cnt-combin.v/************************************************************************//*  									*//* The second step is to set up the process environment. This includes 	*//* defining the wire load model and the operating conditions. 		*//*  									*//*	These commands are described in the Design Compiler Command	*//* 	Reference Manual.						*//*  									*//************************************************************************/set_wire_load "10x10"set_operating_conditions WCCOM/************************************************************************//*  									*//* Next, set up the conditions at the boundry of the design. This 	*//* includes defining the drive level on the input signals, the load on 	*//* the outputs, and the arrival times of the input signals.		*//*  									*//*	These commands are described in the Design Compiler Command	*//* 	Reference Manual.						*//*  									*//************************************************************************/set_drive 1 all_inputs()set_load 4 all_outputs()/************************************************************************//*  									*//* Now, the constraints would be specified. In this example, the 	*//* design must generate a the count and error signals within 30 ns. 	*//* Additionally, the design must not take up more than 100 gates.	*//* This is specified as shown below. 					*//*  									*//*	This command is described in the Design Compiler Command	*//* 	Reference Manual.						*//*  									*//************************************************************************/max_delay 30.0 all_outputs()max_area 100/************************************************************************//*  									*//* Next, the following command will compile this design			*//*									*//*	Chapter 5 of the Design Compiler Reference manual describes	*//*	the compile command and the different options available.	*//*  									*//************************************************************************/compile -map_effort high/************************************************************************//*  									*//* 	The design is now compiled. To view the schematic, click on 	*//* the 'view' button in the Design Compiler Main Menu, or execute	*//* the following commands from the dc_shell command line. 		*//*  									*//* dc_shell> gen -sort							*//* dc_shell> view							*//*  									*//*	The report command may be used to find the size and speed of 	*//* the design. Selecting the 'Report' button from the Main menu will 	*//* display the report types available. The Design Compiler Reference 	*//* Manual describes all the available reports. From the dc_shell 	*//* command line, a report is generated as shown below.			*//*  									*//* dc_shell> report -area						*//* dc_shell> report -timing						*//*  									*//************************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -