www.pudn.com > dvi_demo.rar > autopilot.v, change:2008-07-24,size:10272b


////////////////////////////////////////////////////////////////////////////// 
// Copyright (c) 2007 Xilinx, Inc. 
// This design is confidential and proprietary of Xilinx, All Rights Reserved. 
////////////////////////////////////////////////////////////////////////////// 
//   ____  ____ 
//  /   /\/   / 
// /___/  \  /   Vendor:        Xilinx 
// \   \   \/    Version:       1.0.0 
//  \   \        Filename:      autopilot.v 
//  /   /        Date Created:  July 1, 2007 
// /___/   /\    Last Modified: July 1, 2007 
// \   \  /  \ 
//  \___\/\___\ 
// 
// Devices:   Spartan-3 Generation FPGA 
// Purpose:   Autopilot data storage 
// Contact:   crabill@xilinx.com 
// Reference: None 
// 
// Revision History: 
//   Rev 1.0.0 - (crabill) First created July 1, 2007. 
// 
////////////////////////////////////////////////////////////////////////////// 
// 
// LIMITED WARRANTY AND DISCLAIMER. These designs are provided to you "as is". 
// Xilinx and its licensors make and you receive no warranties or conditions, 
// express, implied, statutory or otherwise, and Xilinx specifically disclaims 
// any implied warranties of merchantability, non-infringement, or fitness for 
// a particular purpose. Xilinx does not warrant that the functions contained 
// in these designs will meet your requirements, or that the operation of 
// these designs will be uninterrupted or error free, or that defects in the 
// designs will be corrected. Furthermore, Xilinx does not warrant or make any 
// representations regarding use or the results of the use of the designs in 
// terms of correctness, accuracy, reliability, or otherwise. 
// 
// LIMITATION OF LIABILITY. In no event will Xilinx or its licensors be liable 
// for any loss of data, lost profits, cost or procurement of substitute goods 
// or services, or for any special, incidental, consequential, or indirect 
// damages arising from the use or operation of the designs or accompanying 
// documentation, however caused and on any theory of liability. This 
// limitation will apply even if Xilinx has been advised of the possibility 
// of such damage. This limitation shall apply not-withstanding the failure 
// of the essential purpose of any limited remedies herein. 
// 
////////////////////////////////////////////////////////////////////////////// 
// Copyright (c) 2007 Xilinx, Inc. 
// This design is confidential and proprietary of Xilinx, All Rights Reserved. 
////////////////////////////////////////////////////////////////////////////// 
 
`timescale 1 ns / 1 ps 
 
module autopilot 
  ( 
  input  wire  [7:0] timestep, 
  output wire [11:0] xlocation, 
  output wire [11:0] ylocation, 
  input  wire        clk 
  ); 
 
  //******************************************************************// 
  // Behavioral BlockRAM description.  At each address (timestep) the // 
  // memory contains position information.                            // 
  //******************************************************************// 
 
  reg  [23:0] rompilot; 
 
  assign xlocation = rompilot[11: 0]; 
  assign ylocation = rompilot[23:12]; 
 
  always @(posedge clk) 
  begin 
    case (timestep) 
      0  : rompilot <= {12'd720, 12'd0	 }; 
      1  : rompilot <= {12'd660, 12'd0	 }; 
      2  : rompilot <= {12'd649, 12'd40	}; 
      3  : rompilot <= {12'd634, 12'd78	}; 
      4  : rompilot <= {12'd617, 12'd116 }; 
      5  : rompilot <= {12'd600, 12'd153 }; 
      6  : rompilot <= {12'd582, 12'd189 }; 
      7  : rompilot <= {12'd565, 12'd225 }; 
      8  : rompilot <= {12'd548, 12'd259 }; 
      9  : rompilot <= {12'd532, 12'd293 }; 
      10 : rompilot <= {12'd516, 12'd325 }; 
      11 : rompilot <= {12'd500, 12'd357 }; 
      12 : rompilot <= {12'd485, 12'd388 }; 
      13 : rompilot <= {12'd471, 12'd419 }; 
      14 : rompilot <= {12'd457, 12'd448 }; 
      15 : rompilot <= {12'd444, 12'd476 }; 
      16 : rompilot <= {12'd431, 12'd504 }; 
      17 : rompilot <= {12'd418, 12'd531 }; 
      18 : rompilot <= {12'd407, 12'd557 }; 
      19 : rompilot <= {12'd395, 12'd582 }; 
      20 : rompilot <= {12'd384, 12'd606 }; 
      21 : rompilot <= {12'd374, 12'd629 }; 
      22 : rompilot <= {12'd363, 12'd652 }; 
      23 : rompilot <= {12'd354, 12'd674 }; 
      24 : rompilot <= {12'd344, 12'd694 }; 
      25 : rompilot <= {12'd335, 12'd714 }; 
      26 : rompilot <= {12'd327, 12'd734 }; 
      27 : rompilot <= {12'd318, 12'd752 }; 
      28 : rompilot <= {12'd310, 12'd769 }; 
      29 : rompilot <= {12'd302, 12'd786 }; 
      30 : rompilot <= {12'd295, 12'd801 }; 
      31 : rompilot <= {12'd288, 12'd816 }; 
      32 : rompilot <= {12'd281, 12'd830 }; 
      33 : rompilot <= {12'd274, 12'd843 }; 
      34 : rompilot <= {12'd268, 12'd856 }; 
      35 : rompilot <= {12'd262, 12'd867 }; 
      36 : rompilot <= {12'd256, 12'd878 }; 
      37 : rompilot <= {12'd250, 12'd887 }; 
      38 : rompilot <= {12'd244, 12'd896 }; 
      39 : rompilot <= {12'd239, 12'd904 }; 
      40 : rompilot <= {12'd234, 12'd911 }; 
      41 : rompilot <= {12'd229, 12'd918 }; 
      42 : rompilot <= {12'd224, 12'd923 }; 
      43 : rompilot <= {12'd220, 12'd928 }; 
      44 : rompilot <= {12'd215, 12'd932 }; 
      45 : rompilot <= {12'd211, 12'd934 }; 
      46 : rompilot <= {12'd207, 12'd937 }; 
      47 : rompilot <= {12'd203, 12'd938 }; 
      48 : rompilot <= {12'd199, 12'd938 }; 
      49 : rompilot <= {12'd195, 12'd938 }; 
      50 : rompilot <= {12'd191, 12'd936 }; 
      51 : rompilot <= {12'd187, 12'd934 }; 
      52 : rompilot <= {12'd183, 12'd931 }; 
      53 : rompilot <= {12'd179, 12'd927 }; 
      54 : rompilot <= {12'd175, 12'd922 }; 
      55 : rompilot <= {12'd172, 12'd917 }; 
      56 : rompilot <= {12'd169, 12'd910 }; 
      57 : rompilot <= {12'd165, 12'd903 }; 
      58 : rompilot <= {12'd162, 12'd895 }; 
      59 : rompilot <= {12'd159, 12'd886 }; 
      60 : rompilot <= {12'd156, 12'd876 }; 
      61 : rompilot <= {12'd154, 12'd865 }; 
      62 : rompilot <= {12'd151, 12'd853 }; 
      63 : rompilot <= {12'd148, 12'd841 }; 
      64 : rompilot <= {12'd146, 12'd828 }; 
      65 : rompilot <= {12'd143, 12'd813 }; 
      66 : rompilot <= {12'd141, 12'd798 }; 
      67 : rompilot <= {12'd139, 12'd783 }; 
      68 : rompilot <= {12'd136, 12'd766 }; 
      69 : rompilot <= {12'd134, 12'd748 }; 
      70 : rompilot <= {12'd132, 12'd730 }; 
      71 : rompilot <= {12'd130, 12'd711 }; 
      72 : rompilot <= {12'd128, 12'd691 }; 
      73 : rompilot <= {12'd126, 12'd670 }; 
      74 : rompilot <= {12'd124, 12'd648 }; 
      75 : rompilot <= {12'd124, 12'd631 }; 
      76 : rompilot <= {12'd126, 12'd610 }; 
      77 : rompilot <= {12'd128, 12'd589 }; 
      78 : rompilot <= {12'd130, 12'd569 }; 
      79 : rompilot <= {12'd132, 12'd549 }; 
      80 : rompilot <= {12'd134, 12'd531 }; 
      81 : rompilot <= {12'd136, 12'd513 }; 
      82 : rompilot <= {12'd139, 12'd497 }; 
      83 : rompilot <= {12'd141, 12'd481 }; 
      84 : rompilot <= {12'd143, 12'd466 }; 
      85 : rompilot <= {12'd146, 12'd452 }; 
      86 : rompilot <= {12'd148, 12'd438 }; 
      87 : rompilot <= {12'd151, 12'd426 }; 
      88 : rompilot <= {12'd154, 12'd414 }; 
      89 : rompilot <= {12'd156, 12'd403 }; 
      90 : rompilot <= {12'd159, 12'd394 }; 
      91 : rompilot <= {12'd162, 12'd385 }; 
      92 : rompilot <= {12'd165, 12'd376 }; 
      93 : rompilot <= {12'd169, 12'd369 }; 
      94 : rompilot <= {12'd172, 12'd363 }; 
      95 : rompilot <= {12'd175, 12'd357 }; 
      96 : rompilot <= {12'd179, 12'd352 }; 
      97 : rompilot <= {12'd183, 12'd348 }; 
      98 : rompilot <= {12'd187, 12'd345 }; 
      99 : rompilot <= {12'd191, 12'd343 }; 
      100: rompilot <= {12'd195, 12'd342 }; 
      101: rompilot <= {12'd199, 12'd341 }; 
      102: rompilot <= {12'd203, 12'd341 }; 
      103: rompilot <= {12'd207, 12'd343 }; 
      104: rompilot <= {12'd211, 12'd345 }; 
      105: rompilot <= {12'd215, 12'd348 }; 
      106: rompilot <= {12'd220, 12'd351 }; 
      107: rompilot <= {12'd224, 12'd356 }; 
      108: rompilot <= {12'd229, 12'd361 }; 
      109: rompilot <= {12'd234, 12'd368 }; 
      110: rompilot <= {12'd239, 12'd375 }; 
      111: rompilot <= {12'd244, 12'd383 }; 
      112: rompilot <= {12'd250, 12'd392 }; 
      113: rompilot <= {12'd256, 12'd402 }; 
      114: rompilot <= {12'd262, 12'd412 }; 
      115: rompilot <= {12'd268, 12'd424 }; 
      116: rompilot <= {12'd274, 12'd436 }; 
      117: rompilot <= {12'd281, 12'd449 }; 
      118: rompilot <= {12'd288, 12'd463 }; 
      119: rompilot <= {12'd295, 12'd478 }; 
      120: rompilot <= {12'd302, 12'd493 }; 
      121: rompilot <= {12'd310, 12'd510 }; 
      122: rompilot <= {12'd318, 12'd527 }; 
      123: rompilot <= {12'd327, 12'd546 }; 
      124: rompilot <= {12'd335, 12'd565 }; 
      125: rompilot <= {12'd344, 12'd585 }; 
      126: rompilot <= {12'd354, 12'd606 }; 
      127: rompilot <= {12'd363, 12'd627 }; 
      128: rompilot <= {12'd374, 12'd650 }; 
      129: rompilot <= {12'd384, 12'd673 }; 
      130: rompilot <= {12'd395, 12'd697 }; 
      131: rompilot <= {12'd407, 12'd722 }; 
      132: rompilot <= {12'd418, 12'd748 }; 
      133: rompilot <= {12'd431, 12'd775 }; 
      134: rompilot <= {12'd444, 12'd803 }; 
      135: rompilot <= {12'd457, 12'd831 }; 
      136: rompilot <= {12'd471, 12'd861 }; 
      137: rompilot <= {12'd485, 12'd891 }; 
      138: rompilot <= {12'd500, 12'd922 }; 
      139: rompilot <= {12'd516, 12'd954 }; 
      140: rompilot <= {12'd532, 12'd986 }; 
      141: rompilot <= {12'd548, 12'd1020}; 
      142: rompilot <= {12'd565, 12'd1055}; 
      143: rompilot <= {12'd582, 12'd1090}; 
      144: rompilot <= {12'd600, 12'd1126}; 
      145: rompilot <= {12'd617, 12'd1163}; 
      146: rompilot <= {12'd634, 12'd1201}; 
      147: rompilot <= {12'd649, 12'd1240}; 
      148: rompilot <= {12'd660, 12'd1279}; 
      149: rompilot <= {12'd720, 12'd1280}; 
      // This covers all the unlisted cases. 
      default: rompilot <= {12'd1200    , 12'd1600    }; 
    endcase 
  end 
  
  //******************************************************************// 
  //                                                                  // 
  //******************************************************************// 
 
endmodule