We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 20070

State Diagram Editor - Does StateCAD support Vector slicing?


In StateCAD, is it possible to assign in a State only parts of a vector or bus?

For example:

vectorA(7 downto 0) <= vectorB(15 downto 8);


Vector slicing can be done using the following notation from the StateCAD User Guide:

Concatenation / Range Operations

Bits (and vectors) can be grouped together to form larger vectors for comparison (A:B:C > 3), grouped for shifting (SHIFT=SHIFT6..SHIFT0:DIN), rotation (ROT=ROT6..ROT0:ROT7), or assignment (BH=A3..A0 AND EN OR A7..A4 AND NOT EN). Constants 1 / 0 can also be concatenated together with bit signals and vectors to pad or mask the vectors (RES = 0:0:R1:R0).

Bits are grouped together using the concatenation operator (colon) and the bit range operator (2 periods). Grouped bits are treated as vectors, and all operations available to vectors including inequalities, assignment, and addition/subtraction are available. Bit range operations require that the beginning and ending signal used in the range come from the same vector.

Alternatively, a user can assign every bit individually.

AR# 20070
Date 12/15/2012
Status Archive
Type General Article
Page Bookmarked