OpenCores
URL https://opencores.org/ocsvn/phr/phr/trunk

Subversion Repositories phr

[/] [phr/] [trunk/] [codigo/] [gui/] [windows/] [gui/] [phr-gui.py] - Diff between revs 182 and 211

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 182 Rev 211
Line 5... Line 5...
import wx
import wx
# imports by maximiq
# imports by maximiq
import os          # se usa para el dialogo de abrir fichero
import os          # se usa para el dialogo de abrir fichero
import subprocess  # para interactuar con el shell
import subprocess  # para interactuar con el shell
 
 
 
#####################################
 
# Para que funcione mejor en Linux
 
#import os
 
 
 
#abspath = os.path.abspath(__file__)
 
#dname = os.path.dirname(abspath)
 
#os.chdir(dname)
 
#####################################
 
 
# begin wxGlade: extracode
# begin wxGlade: extracode
# end wxGlade
# end wxGlade
 
 
 
 
Line 103... Line 111...
 
 
        description = """
        description = """
PHR GUI es una interfaz grafica que permite interactuar con
PHR GUI es una interfaz grafica que permite interactuar con
la Plataforma de Hardware Reconfigurable (desarrollada en el
la Plataforma de Hardware Reconfigurable (desarrollada en el
CUDAR) a traves del software xc3sprog.
CUDAR) a traves del software xc3sprog.
 
 
 
Revision (SVN) 209.
"""
"""
 
 
        licence = """
        licence = """
PHR GUI is free software; you can redistribute it and/or modify
PHR GUI is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as
it under the terms of the GNU General Public License as
Line 125... Line 135...
 
 
        info = wx.AboutDialogInfo()
        info = wx.AboutDialogInfo()
 
 
        info.SetIcon(wx.Icon('grafica/phr-gui-96.png', wx.BITMAP_TYPE_PNG))
        info.SetIcon(wx.Icon('grafica/phr-gui-96.png', wx.BITMAP_TYPE_PNG))
        info.SetName('PHR GUI')
        info.SetName('PHR GUI')
        info.SetVersion('0.1 r183')
        info.SetVersion('0.1')
        info.SetDescription(description)
        info.SetDescription(description)
        #info.SetCopyright('(C) 2014 CUDAR (UTN-FRC)')
        #info.SetCopyright('(C) 2014 CUDAR (UTN-FRC)')
        info.SetCopyright('Abril de 2014, CUDAR (UTN-FRC)')
        info.SetCopyright('Abril de 2014, CUDAR (UTN-FRC)')
        info.SetWebSite('http://opencores.org/project,phr')
        info.SetWebSite('http://opencores.org/project,phr')
        #info.SetLicence(licence)
        #info.SetLicence(licence)
Line 147... Line 157...
2) Elegir el archivo de configuracion (*.bit).
2) Elegir el archivo de configuracion (*.bit).
3) Presione el boton \"Configurar FPGA\".
3) Presione el boton \"Configurar FPGA\".
4) Tras terminar el paso anterior la FPGA debe comenzar a funcionar.
4) Tras terminar el paso anterior la FPGA debe comenzar a funcionar.
 
 
Para programar la memoria PROM:
Para programar la memoria PROM:
1) Setear el jumper en la placa PHR en modo JTAG.
1) Setear el jumper en la placa PHR en modo \"Master Serial\".
2) Elegir el archivo de programacion (*.bit).
2) Elegir el archivo de programacion (*.bit).
3) Presione el boton \"Programar PROM\".
3) Presione el boton \"Programar PROM\".
4) Una vez terminado el paso anterior, cambiar el jumper al modo \"Master
4) Una vez terminado el paso anterior, presionar el boton de RESET.
Serial\" y presionar el boton de RESET.
 
 
 
Mas ayuda en los manuales que puede descargar desde el servidor de
Mas ayuda en los manuales que puede descargar desde el servidor de
OpenCores donde se aloja el proyecto: http://opencores.org/project,phr
OpenCores donde se aloja el proyecto: http://opencores.org/project,phr
"""
"""
        wx.MessageBox(mensaje, 'Info',
        wx.MessageBox(mensaje, 'Info',
Line 202... Line 211...
        self.text_ctrl_console.AppendText(command + "\n")
        self.text_ctrl_console.AppendText(command + "\n")
 
 
        process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
        process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
 
 
        for line in iter(process.stdout.readline, ''):
        for line in iter(process.stdout.readline, ''):
            self.text_ctrl_console.WriteText(line)
            self.text_ctrl_console.AppendText(line)
        process.stdout.close()
        process.stdout.close()
 
 
        self.text_ctrl_console.AppendText("\nPHR>>> ")
        self.text_ctrl_console.AppendText("\nPHR>>> ")
 
 
        ## restaurar entorno 
        ## restaurar entorno 
Line 237... Line 246...
 
 
        self.text_ctrl_console.AppendText(command + "\n")
        self.text_ctrl_console.AppendText(command + "\n")
 
 
        process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
        process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
 
 
        for line in iter(process.stdout.readline, ''):
        line = ''
            self.text_ctrl_console.WriteText(line)
        while True:
        process.stdout.close()
            out = process.stdout.read(1)
 
            if out == '' and process.poll() != None:
 
                break
 
            if out != '' and out != '\x0a':
 
                line = line + out
 
                if out == '\x0d':
 
                    self.text_ctrl_console.AppendText(line)
 
                    line = ''
 
 
        self.text_ctrl_console.AppendText("\nPHR>>> ")
        self.text_ctrl_console.AppendText("\nPHR>>> ")
 
 
        ## restaurar entorno 
        ## restaurar entorno 
        self.button_conf_fpga.Enable()
        self.button_conf_fpga.Enable()
Line 270... Line 286...
        self.text_ctrl_console.AppendText(command + "\n")
        self.text_ctrl_console.AppendText(command + "\n")
 
 
        process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
        process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
 
 
        for line in iter(process.stdout.readline, ''):
        for line in iter(process.stdout.readline, ''):
            self.text_ctrl_console.WriteText(line)
            self.text_ctrl_console.AppendText(line)
        process.stdout.close()
        process.stdout.close()
 
 
        self.text_ctrl_console.AppendText("\nPHR>>> ")
        self.text_ctrl_console.AppendText("\nPHR>>> ")
 
 
        ## restaurar entorno 
        ## restaurar entorno 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.