310 likes | 322 Views
This paper introduces EQ-sequences, an extension of Q-sequences, for representing floorplans. It includes detailed information on encoding, moving, and decoding floorplans efficiently using unique codes. Key concepts such as walls, prime segments, adjacent relationships, and algorithmic complexities are discussed. The proposed EQ-sequence allows for checking room connectivity while moving and ensures unique representations of floorplans.
E N D
Title and Authors EQ-Sequences for Coding Floorplans
1. Introduction-1 A floorplan is a dissection of a rectangle called chip into smaller rectangles called rooms by horizontal and vertical line segments, which meet in T-junctions. The floorplanning contains: • Encoding (to represent floorplans); • Moving (to transform floorplans) ; • Decoding (to realize floorplans).
1. Introduction-2 In order togenerate and evaluate candidate floorplans to determine the best floorplan encountered so far, floorplans should be represented by codes that satisfy the followings: • Any feasible floorplan can be representedby an unique code; • The code is decoded to one and only onefloorplan; • Code moving can be efficiently implemented; • Abutment relationships of two rooms can be checked out before decoding or while moving.
1. Introduction-3 In this paper, we propose a new code for representing a floorplan called EQ-sequence, which can be considered as anExtension of aQ-sequence. The advantages of EQ-sequence: • Any floorplan with different adjacent relationships of rooms can be encoded by a uniqueEQ-sequence and an EQ-sequence can be decoded to a unique floorplan, both are inO(n) time. • Whether two rooms is connected (abut) or not can be checked while moving the EQ-sequences.
2. BASIC CONCEPTS-1 (Walls and Prime Seg) p1 p2 p6 p3 p4 p5 p7 The segments enclosing the chip as walls particularly are called right-wall(WR), left-wall (WL), top-wall (WT)andbottom-wall(WB). WT For any room r, two segs meet at the right-bottom corner of r and one ends there forming a T-junction. The seg that ends at the T-junction is called the prime seg of r, denoted by pr. Note that the right-bottom room has not a prime seg. WR WL WB
2. Basic Concepts-2 (Q-sequence) WT p1 p2 p6 p3 p4 WR WL p5 p7 WB Q-sequence: is a concatenation of the statesof rooms(WL orWT), represented by a sequence Q(r) (Q(WL) or Q(WT)). Q(r) (Q(WL) or Q(WT)) has the one of the patterns (a>b>c…>d). r(WL)RaRbRc…Rd or r(WT)BaBbBc…Bd The Q-sequence of the floorplan is: WLR3R1WTB6B2B1 1R2 2B4B3 3R8R5R4 4B5 5R7R6 6B7 7B8 8
2. Basic Concepts-3 (adjacent relationships ) 5 2 5 5 2 2 6 6 6 (a) (b) (c) The floorplans (a) (b) and (c) are equivalent under Q-sequence representations. It is evident that the adjacent relationships of rooms are different. In order to represent the adjacent relationships of rooms in a floorplan, we extend the Q-sequence to propose a new code called EQ-sequence.
3.EQ-Sequence Encoding-1 (Def. of Adjacent number) Definition 3.1: Let i be a room except for the right-bottom room, if the prime seg pi is vertical (horizontal), the number of the rooms which are below(right-of) i and adjacent to iis called adjacent number of i, denoted by Si. If the below (right-of) of i is wall, Si =0. S2 WT S6 S1 p1 p2 S4 p6 p3 p4 WR WL S7 p5 p7 S3 S5 WB For defining the EQ-sequence, we give the concept of adjacent number of every room. The adjacent numbers of each room are S1=1, S2=1, S3=0, S4=2, S5=1, S6=0 and S7=0.
3.EQ-Sequence Encoding-2 (Def. of Ai , Ii ) prime seg prk For giving the properties of EQ-sequence, the following definitions are very important. Definition 3.4: Let rk be a room except for the right-bottom room, the rooms adjacent to the prime seg prkon the opposite side of rk form an associated room setof rk, denoted by Ark. Moreover, when the prime seg prk is either horizontal or vertical, all of the rooms adjacent to prkon the same side of rk form an inside room set of rk, denoted by Irk. Ark = {R1, R2, R3, …, Rm}, Irk={r1, r2, r3, …, rk}
3.EQ-Sequence Encoding-3 (Adjacent number constrain) Sr1 Sr2 Srk-1 r r …… r 1 k 2 R R R R …… 2 1 3 m There are k rooms There are m rooms Lemma 3.1: The adjacent numbers of each primeseg prk satisfy the following constraint: Sr1+Sr2+Sr3+……+Sr k-1 k+m–2 It is very important to understand Lemma 3.1 in an EQ-sequence.
3.EQ-Sequence Encoding-4 ( Def. of EQ-S) NSr NSr S2 WT S6 N0 S1 p1 p2 S4 N0 p6 p3 p4 WR WL S7 p5 p7 S3 S5 WB Definition 3.2: For a room r, its stateEQ(r) is rNSrRaRbRc…Rd or rNSrBaBbBc…Bd. Similarly, EQ(WL)= WLN0RaRbRc…RdandEQ(WT)= WTN0BaBbBc…Bd Definition 3.3: An EQ-sequence for a floorplan of n rooms is a concatenation of the states: (EQ(WL)EQ(WT)EQ(1)EQ(2) ……EQ(n)). The EQ-sequence of the floorplan is: WLN0R3R1WTN0B6B2B1 1N1R2 2N1B4B3 3N0R8R5R4 4N2B5 5N1R7R6 6N0B7 7N0B8 8
3.EQ-Sequence Encoding-5 (How to obtain Ai , CBi and CRi) Algorithm 3.1: Finding all inside room sets in a Q-sequence of n rooms. Algorithm 3.2: Finding all associated room sets in a Q-sequence of n rooms. The computation complexitiesof them are O(n).
3.EQ-Sequence Encoding-6 k m k m For a givenQ-sequence with n rooms, we make an E-sequence by inserting N0 behind WL and WT, and NSibehind room label i for room 1 to n-1 in the Q-sequence. Theorem 3.1:AnE-sequence is anEQ-sequence if and only ifall inserted numbers Siin the E-sequence satisfy Lemma 3.1. Lamme 3.1: For each prime segprk, let Irk be {r1, r2,…, rk}, Ark={R1, R2,…, Rm} the adjacent numbers of room r1, r2, …, rk-1 be Sr1, Sr2, …, Srk-1 and, the following inequality holds. Sr1+Sr2+Sr3+……+Srk-1k+m–2
3.EQ-Sequence Encoding-6 (Example) WT p1 p2 p6 p3 p4 WR WL p5 p7 Unique-Symbol and Parenthesis: WB WLN0R3R1WTN0B6B2B1 1N1R2 2N1B4B3 3N0R8R5R4 4N2B5 5N1R7R6 6N0B7 7N0B8 8 By Theorem 3.1: (Sr1+Sr2+Sr3+……+Srk-1k+m–2) For p2, I2= {1, 2}, i.e. k=2, A2={3, 4}, i.e. m=2 and S1=1, so the inequality S1 2+2–2=2 holds well.
4. Module Placements-1 (Moving) Homomorphic moving (b) (a) (c) Hetermorphic moving (e) (d) Homomorphic moving (f) Homomorphic moving (Q-Seq. is unchanged) and Hetermorphic moving (This is a question of moving Q-Seq.)
4. Module Placements-2 (Moving) Input an EQ-s Moving Hetermorphic moving ? y The method of moving between EQ-sequences can be explained by the chart. EQ-s Q-s Hetermorphic moving Algorithm4.1 Q-s EQ*-s Homomorphic moving Algorithm4.2 Satisfy abutment constraints? Algorithm4.3 y Decode Algorithm5.1 Evaluate OK Algorithm5.2 Output Solution
4. Module Placements-3 (Moving) Step 1: Choose a room state of Q(i)= iBaBbBc…Bd(iRaRbRc…Rd) where |{BaBbBc…Bd }|>1, or |{ RaRbRc…Rd}|>1. Step 2:When 1< i <n, Ba(Ra) can be moved to the front of Bi(Ri), or when 1i <n-2andafter i is B (R), Bk(Rk) in the front of Bi(Rk) can be moved to the rear of room i. This method is called Position Moving in a Q-sequece moving [paper 15] Algorithm 4.1:Hetermorphic Moving Input: a Q-sequence of n rooms Output: a moved Q-sequence
4. Module Placements-3 (Example of Hetermorphic moving) Move B5 to the front of B2 WLR4R3R1WTB5B2B11R2 2B3 3B4 4R6R5 5B6 6 Move R3 to the rear of room 1 WLR4R1 WTB5B2B11R3R2 2B3 3B4 4R6R5 5B6 6 2 1 3 5 4 6 Algorithm4.1 WLR4R3R1 WTB2B1 1R22B5B3 3B4 4R6R5 5B6 6
4. Module Placements-4 (Moving) Step 3:For a prime seg prk whose |Irk|>1, let Irk = {r1, r2, r3, …, rk} and Ark ={R1, R2, R3,…, Rm}. If m=1, then let Sr1=Sr2=Sr3=…=Srk-1=1; If m>1, generating random numbers x1, x2, x3, …,xk which are in (0, 1), each adjacent number Sri(1i k-1) can be given by so that a moved EQ-Sequence can be gotten. Algorithm 4.2:Homomorphic moving Input: An EQ-sequence or a Q-sequence of n rooms Output: A moved EQ-sequence Step 1:Finding all inside room sets and all associated room sets of the EQ-sequence or Q-sequence by the algorithm 3.1 and 3.2. Step 2:Initialize Sj=0, 1 jn-1.
4. Module Placements-5 (Moving) S2 p2 1 2 S1 S4 6 4 p5 3 5 7 S1=2, S2=1 and S4=1 8 WLN0R3R1WTN0B6B2B1 1N1R22N1B4B3 3N0R8R5R4 4N2B5 5N1R7R6 6N0B7 7N0B8 8 WLN0R3R1WTN0B6B2B1 1N2R22N1B4B3 3N0R8R5R4 4N1B5 5N1R7R6 6N0B7 7N0B8 8 For p2 , I2={1, 2} and A2={3, 4} where k=2 andm=2,x1=0.922 and x2=0.374, we have For p5 , I5={2, 4, 5} andA5={6, 7} where k=3, m=2, x1=0.300 and x2=0.345, x3=0.302, we have Example of Homomorphic moving
4. Module Placements-6 (Abutment Judgment of Two Rooms) • Theorem 4.1:Let a and b (a<b) be two rooms indicated by Abe order in a floorplan, the condition that a and b abut each other is as follows. • (1) If a and b are in the same inside room set or the same associated room set and there is no room c between a and b,thena and b abut each other. • (2) If a is the i-th room in Irk={r1, r2, r3,…, rk} and b is the j-th room in Ark={R1, R2, R3,…, Rm}, and the adjacent numbers of rooms r1, r2, r3,…, rk -1 be Sr1, Sr2, Sr3, …, Srk-1. When one of the following inequalities is satisfied • i=1, 1jSr1, • 1<i<k, Sr1 + …+ Sri-1–i+2j Sr1 + …+ Sri–i+1, • i= k, Sr1+Sr2+ …+ Srk-1–k+2j m, • then a and b abut each other.
4. Module Placements-7 (Judging two rooms abutment) WT p1 p2 p6 p3 p4 WR WL p5 p7 WB Judge the adjacent relationships between room4 and 6, 5 and 6. Firstly, room 4 and 6 , 5 and 6 join with p5on the different sides. Then, I5 ={2, 4, 5} and A5={6, 7},k=3, m=2, and S2=1,S4=2. Room 4 is the 2nd and room 6 is the 1st room in A5. room 5 are 3rd room in I5. For room 4 and 6, we have i =2<k, j=1 and S2 –i +2= 1, S2+ S4–i +1= 2, the inequalityS2 –i +2=1j S2+ S4–i +1= 2 is satisfied. According to Theorem 4.1, room 4 and 6 abut. For room 5 and 6, we have i =3=k, j=1 and S2+ S4–i +2= 2,it is not satisfyS2+S4–k+2j m,room 5 and 6 do not abut.
5. EQ-SEQUENCE DECODING -1 Constraint relations table Constraint Graphs (horizontal constraint graph and vertical constraint graph) Grid Floorplan EQ-sequence
5. EQ-SEQUENCE DECODING -2 The relationships between rooms and H-type vertexes. H RV table V RV table room vertex room vertex 1 V 1 V 2 1 2 V 2 V 2 5 3 V 3 V WT B 3 4 V 4 V p2 p1 4 5 The relationships between rooms and V-type vertexes. p6 5 V 5 V 7 5 p4 6 V 6 V p3 WR 6 R WL p5 7 V 7 V p7 7 R 8 V 8 V B R WB The constraint relations table
5. EQ-SEQUENCE DECODING -3 VT Vertex generating: Each horizontal prime seg piis corresponding to vertex Vi; WTand WB are corresponding to VTand VB.. V2 V6 V4 Edge generating: (1) For each B pattern state EQ(r)=rNSrBaBb…Bd, (EQ(WT)=WTN0BaBb…Bd),consider each room ri {a, b, …, d}, we draw an edge from vertexVp to Vr,where Vp is corresponding to riand Vr is corresponding to r in the HRV table. V7 VB H RV table room vertex VB 1 V 2 2 V 2 3 V B 4 V 4 5 V For WTN0B6B2B1,we draw the edgese6, e2and e1 from V6 to VT, V2to VT and V2to VT because room 6 is corresponding to V6 and room 2 is corresponding to V2 and room 1 is corresponding to V2 in HRV table. 7 6 V 6 7 V 7 8 V B How to obtain B-partial graph (Vertical constraint graph) For the EQ-sequence : WLN0R3R1 WTN0B6B2B11N1R22N1B4B3 3N0R8R5R44N2B5 5N1R7R66N0B7 7N0B8 8
5. EQ-SEQUENCE DECODING -3 The above-below constraint relation on opposite sides of vertical prime seg V2 Quasi-dual graphs R-partial graph and Horizontal constraint graph V1 V1 VT VT VT VT V2 V2 V2 VR VR V6 V6 VL VL V4 V4 V5 V5 V3 V3 V3 V3 V3 V3 V7 V7 VB VB VB VB B-partial graph and Vertical constraint graph
5. EQ-SEQUENCE DECODING -4 • VT VH1 VH2 … VHn • VB VL VV1VV2 … VVm VR Decoding by a grid On a grid, using the algorithm of Depth-First search sorting algorithm , to get the order of all vertexes in the constraint graphs, the relative positions of prime segs can be obtained.
5. EQ-SEQUENCE DECODING –5 (Example) For example, consider V5 ( p5 ) which is a V-type vertex, I5= {2,4,5}, from the EQ-sequence, we can find a stateWTN0B6B2B1that containsB2. Thus, one endpoint corresponding to p5 is VT. By the same method, we can determine the two endpoints of the other prime segs. We want to find the two endpoints of the prime seg. VT (WT) V2 (p2) V6 (p6) V4 (p4) V7 (p7) VB (WB) VL (WL) V1 (p1) V3 (p3) V5 (p5) VR (WR) Then, we find the other inside room set {5,7} containing5.Because the vertex corresponding to this set is V7, the other endpoint is V7.
5. EQ-SEQUENCE DECODING -6 Algorithm5.1 Algorithm 5.1:Decoding of EQ-sequences Input:an EQ-sequence Output:a floorplan corresponding to the EQ-sequence Step 1: Establishing the constraint relations table. Step 2: Making the vertical constraint graph and the horizontal constraint graph. Step 3: Sorting the position relation of vertexes in the vertical constraint graph (horizontal constraint graph) by the algorithm of Depth-First search sorting algorithm, and generating a grid. Step 4:Determiningtwo endpoints of each prime seg in the grid.
6. Conclusion Algorithm5.1 The contribution of the EQ-sequence is to develop the Q-sequence. Any floorplan of n rooms is uniquely encoded by an EQ-sequence and any EQ-sequence is uniquely decoded to a floorplan, both are in O(n) time. • Abutment constraints of rooms. When moving, some rooms are needed to abut walls or some rooms are desired to abut each other. • To calculate the chip area roughly. It is possible to get the maximum size of the floorplan after decoding. • 3. In floorplanning, the relationships of placement and routing should be considered.
END Algorithm5.1 Thank you! ご静聴、ありがとうございます! 謝謝! Please give us some suggestions. ご意見を聞かせてください. 請多提宝貴意見