Home.Verilog.Digital Design.Digital Basics.Python.RF Basics.
Custom Search

Legal Disclaimer

Chip Designing for ASIC/ FPGA Design engineers and Students
Digital-logic Design...  Dream for many students… start learning front-end…

Legal Disclaimer

@TYH :- 4G LTE Long Term Evolution Tutorial, CloudComputing
Verilog Tutorial.
Get Noticed:- Submit your own content to be published on fullchipdesign.com

Send it to fullchip@gmail.com

Digital Basics Tutorial.
File read operations.

Class & global var.

File write op's.

Glob module.

Conditional stms.

String 2 hex.

UNIX in Python.

Diamond Pattern.

TypeError - arg.

TyprError - str.

TypeError - strconv.


Function call.

Read bin files.

Python common error message TypeError -Arg


So the updated code becomes

import sys
class tables:
   def __init__(self,w):
       ans = self.T0_r(w)
       print "Result = %s" % (ans)
    def T0_r(self, w):
       self.w = w
       self.s1_t0_r = self.T0[self.w]
       return self.s1_t0_r
    def tables_ls(self):    
        self.T0 = ['0xFF563C6' ,'0x84FF7CF8' ,'0x897788EE' ,'0x8EFB7BF6',
               '0xFE2F2FF ' ,'0xBCAF6BD6' ,'0xAA6F6FDE' ,'0xFFC5C591']

def main ():
   # Read 0 element of the table array by calling class
   y = tables(0x4)
y = tables(0x4)
Python. Python is a scripting language based on Object Oriented Principles with extensive support for engineering requirements. Python examples

File read, ‘sys.argv’, classes, global variables functions,
File write, command line, classes in file writes, glob module
Python conditional statements, convert string to hexadecimal  value, strip off white space and convert hex to signed values.
Advanced program to read file, filter text, conversion to HEX, conversion from Hexadecimal to Signed Magnitude
Advanced python code to cover UNIX shell commands, read lines from a text file, ‘sysargv’ command line operations, use of class and multiple functions. 
Read binary files, Calling classes using main function, generate diamond pattern. Python error’s with complete code examples:-
TypeError: __init__() takes exactly 2 arguments (1 given) TypeError: 'str' object is not callable
TypeError: not all arguments converted during string formatting .
AttributeError:  ** instance has no attribute **
LTE - Long Term Evolution topics from here